Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 26, 2011 11:51PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 28, 2011 06:13PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
.And use brackets for ifs.... just good programming.Language: PHPif(isset($Submit==';Yes';)) { //check if is set $result = mysql.....
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 28, 2011 09:23PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 28, 2011 09:57PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Language: PHP<?php include (';connect.php';); error_reporting(0); Edited: You cannot post ALL your code here....
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 06:45AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 03:25PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 03:36PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 05:39PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Language: PHPif(isset($Submit=="yes';)) { // handle the form input i.e. insert into database - bit check is the user does not already exist - which requires another if/else statement here } else { //show the registration form }
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 07:05PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 29, 2011 08:49PM |
Registered: 12 years ago Posts: 54 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 August 30, 2011 06:57AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 September 12, 2011 07:58PM |
Registered: 12 years ago Posts: 6 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 September 13, 2011 06:43AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 September 19, 2011 03:08PM |
Registered: 12 years ago Posts: 17 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 September 19, 2011 03:29PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 September 20, 2011 02:35PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 01:51AM |
Registered: 12 years ago Posts: 19 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 06:19AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 12:14PM |
Registered: 12 years ago Posts: 19 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 12:32PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 12:59PM |
Registered: 12 years ago Posts: 19 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 01:45PM |
Registered: 12 years ago Posts: 19 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 05, 2011 02:28PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 11, 2011 03:10PM |
Registered: 13 years ago Posts: 3 Rating: 0 |
Language: PHP//########################################################################### //GET THE USER REGISTRATION INFO AND CHECK FOR SQL DANGEROUS CHARACTERS //########################################################################### $user_full_names = $_POST[';fullname';]; $user_surname = $_POST[';surname';]; $use_names = $_POST[';username';]; $user_password = $_POST[';password';]; $confirm_password = $_POST[';confirmpassword';]; $use_name= htmlspecialchars($use_name); $user_password = htmlspecialchars($user_password); //########################################################################### // CHECK THE CORRECT LENGTH OF USER INPUT TO UNABLE MALICIOUS USERS TO // GET errorMessages THAT WILL GIVE THEM ACCESS TO SEND DATA TO THE DATABASE //########################################################################### //########################################################################## // Write to the database IF $errorMessage IS BLANK ELSE DISPLAY ERROR //########################################################################## if ($errorMessage == "") { //###################################################################### //###############Connection to the database############################# $user_name = "root"; $pass_word = ""; $database = "belan"; $server = "127.0.0.1"; $db_handle = mysql_connect($server, $user_name, $pass_word); $db_found = mysql_select_db($database, $db_handle); if ($db_found) { $user__names = quote_smart($user_names, $db_handle); $user_password = quote_smart($user_password, $db_handle); //==================================================================== // CHECK THAT THE USERNAME IS NOT TAKEN //==================================================================== $SQL = "SELECT * FROM user WHERE username = $user_names"; $result = mysql_query($SQL); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { $errorMessage = "Username already taken"; } else { $SQL = "INSERT INTO user (name,surname,username,password) VALUES ($user_full_name,$user_surname,$user_names, md5($user_password))"; $result = mysql_query($SQL); mysql_close($db_handle);
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 11, 2011 06:32PM |
Registered: 12 years ago Posts: 39 Rating: 0 |
Re: ) Notice: Undefined variable: result in C:\wamp\www\php.php on line 21 October 13, 2011 10:41AM |
Registered: 13 years ago Posts: 3 Rating: 0 |