Registration Form

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

58 Replies - 4659 Views - Last Post: 20 June 2010 - 07:56 AM Rate Topic: -----

#1 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Registration Form

Posted 04 June 2010 - 03:38 PM

I'm making a form in PHP that allows people to log into my web site. I'm not going to tell the error since you can see it here. The error does say that the file is on my server but I know it's there. Here is the code for the register.php page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Descritption" content="Register Env X Programming, web designing, graphic designing, and social networking."/>
<meta name="Keywords" content="register, env,x, programming, web, designing, graphic, designing, and, social, networking"/>
<meta name="rating" content="General" />
<meta name="revist-after" content="7 days" />
<meta naem="ROBOTS" content="All" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Env X | Register</title>
<link href="style/main.css" rel="Stylesheet" type="text/css" />
<style type="text/css">
<!--
.red {
	color: #F00;
}
-->
</style>
</head>

<body>
<?php include_once"scripts/submit_data.php";?>
<center>
  <img src="images/header.gif" width="950" height="100" alt="header" longdesc="images/header.gif" />
</center>
<center>
<h3>Create your Account</h3></center>
<center>
  <p style="color:#F00">Any field with an &quot;*&quot; is required.</p>
</center>
<table width="400" border="0" align="center">
  <form action="register_account.php" method="post" enctype="multipart/form-data">
    <tr>
      <td width="128">First Name:<span class="red">*</span></td>
      <td width="262"><input type="text" name="first_name" maxlength="32"/></td>
    </tr>
    <tr>
      <td>Last Name:<span class="red">*</span></td>
      <td>
       <input type="text" name="last_name" maxlength="32"/>
     </td>
    </tr>
        <tr>
      <td>Password:<span class="red">*</span></td>
      <td>
       <input type="password" name="password" maxlength="25"/>
     </td>
    </tr>
    <tr>
    <td>Confirm Password:<span class="red">*</span></td>
    <td>
       <input type="password" name="confirm_password" maxlength="255"/>
     </td>
    </tr>
     <tr>
       <td>Country:</td>
       <td>
         <select name="country">
           <option value="Afghanistan" selected="selected">Afghanistan</option>
           <option value="Albania">Albania</option>
           <option value="Algeria">Algeria</option>
           <option value="Andorra">Andorra</option>
           <option value="Angola">Angola</option>
           <option value="Antigua & Deps">Antigua & Deps</option>
           <option value="Argentina">Argentina</option>
           <option value="Armenia">Armenia</option>
           <option value="Australia">Australia</option>
           <option value="Austria">Austria</option>
           <option value="Azerbaijan">Azerbaijan</option>
           <option value="Bahamas">Bahamas</option>
           <option value="Bahrain">Bahrain</option>
           <option value="Bangladesh">Bangladesh</option>
           <option value="Barbados">Barbados</option>
           <option value="Belarus">Belarus</option>
           <option value="Belgium">Belgium</option>
           <option value="Belize">Belize</option>
           <option value="Benin">Benin</option>
           <option value="Bhutan">Bhutan</option>
           <option value="Bolivia">Bolivia</option>
           <option value="Bosnia">Bosnia</option>
           <option value="Herzegovina">Herzegovina</option>
           <option value="Botswana">Botswana</option>
           <option value="Brazil">Brazil</option>
           <option value="Brunei">Brunei</option>
           <option value="Bulgaria">Bulgaria</option>
           <option value="Burkina">Burkina</option>
           <option value="Burundi">Burundi</option>
           <option value="Cambodia">Cambodia</option>
           <option value="Cameroon">Cameroon</option>
           <option value="Canada">Canada</option>
           <option value="Cape Verde Central">Cape Verde Central</option>
           <option value="African Rep">African Rep</option>
           <option value="Chad">Chad</option>
           <option value="Chile">Chile</option>
           <option value="China">China</option>
           <option value="Colombia">Colombia</option>
           <option value="Comoros Congo">Comoros Congo</option>
           <option value="Congo {Democratic Rep}">Congo {Democratic Rep}</option>
           <option value="Costa Rica">Costa Rica</option>
           <option value="Croatia">Croatia</option>
           <option value="Cuba">Cuba</option>
           <option value="Cyprus">Cyprus</option>
           <option value="Czech Republic">Czech Republic</option>
           <option value="Denmark">Denmark</option>
           <option value="Djibouti">Djibouti</option>
           <option value="Dominica">Dominica</option>
           <option value="Dominican Republic">Dominican Republic</option>
           <option value="East Timor">East Timor</option>
           <option value="Ecuador">Ecuador</option>
           <option value="Egypt">Egypt</option>
           <option value="El Salvador">El Salvador</option>
           <option value="Equatorial Guinea">Equatorial Guinea</option>
           <option value="Eritrea">Eritrea</option>
           <option value="Estonia">Estonia</option>
           <option value="Ethiopia">Ethiopia</option>
           <option value="Fiji">Fiji</option>
           <option value="Finland">Finland</option>
           <option value="France">France</option>
           <option value="Gabon">Gabon</option>
           <option value="Gambia">Gambia</option>
           <option value="Georgia">Georgia</option>
           <option value="Germany">Germany</option>
           <option value="Ghana">Ghana</option>
           <option value="Greece">Greece</option>
           <option value="Grenada">Grenada</option>
           <option value="Guatemala">Guatemala</option>
           <option value="Guinea">Guinea</option>
           <option value="Guinea-Bissau">Guinea-Bissau</option>
           <option value="Guyana">Guyana</option>
           <option value="Hait">Hait</option>
           <option value="Honduras"> Honduras</option>
           <option value="Hungary">Hungary</option>
           <option value="Iceland">Iceland</option>
           <option value="India">India</option>
           <option value="Indonesia">Indonesia</option>
           <option value="Iran">Iran</option>
           <option value="Iraq">Iraq</option>
           <option value="Ireland {Republic}">Ireland {Republic}</option>
           <option value="Israel">Israel</option>
           <option value="Italy">Italy</option>
           <option value="Ivory Coast">Ivory Coast</option>
           <option value="Jamaica">Jamaica</option>
           <option value="Japan">Japan</option>
           <option value="Jordan">Jordan</option>
           <option value="Kazakhstan">Kazakhstan</option>
           <option value="Kenya">Kenya</option>
           <option value="Kiribati">Kiribati</option>
           <option value="Korea">Korea</option>
           <option value="North Korea">North Korea</option>
           <option value="South Kosovo">South Kosovo</option>
           <option value="Kuwait">Kuwait</option>
           <option value="Kyrgyzstan">Kyrgyzstan</option>
           <option value="Laos">Laos</option>
           <option value="Latvia">Latvia</option>
           <option value="Lebanon">Lebanon</option>
           <option value="Lesotho">Lesotho</option>
           <option value="Liberia">Liberia</option>
           <option value="Libya">Libya</option>
           <option value="Liechtenstein">Liechtenstein</option>
           <option value="Lithuania">Lithuania</option>
           <option value="Luxembourg">Luxembourg</option>
           <option value="Macedonia">Macedonia</option>
           <option value="Madagascar">Madagascar</option>
           <option value="Malawi">Malawi</option>
           <option value="Malaysia">Malaysia</option>
           <option value="Maldives">Maldives</option>
           <option value="Mali">Mali</option>
           <option value="Malta Marshall Islands">Malta Marshall Islands</option>
           <option value="Mauritania">Mauritania</option>
           <option value="Mauritius">Mauritius</option>
           <option value="Mexico">Mexico</option>
           <option value="Micronesia">Micronesia</option>
           <option value="Moldova">Moldova</option>
           <option value="Monaco">Monaco</option>
           <option value="Mongolia">Mongolia</option>
           <option value="Montenegro">Montenegro</option>
           <option value="Morocco">Morocco</option>
           <option value="Mozambique">Mozambique</option>
           <option value="Myanmar, {Burma}">Myanmar, {Burma}</option>
           <option value="Namibia">Namibia</option>
           <option value="Nauru">Nauru</option>
           <option value="Nepal">Nepal</option>
           <option value="Netherlands">Netherlands</option>
           <option value="New Zealand">New Zealand</option>
           <option value="Nicaragua">Nicaragua</option>
           <option value="Niger">Niger</option>
           <option value="Nigeria">Nigeria</option>
           <option value="Norway">Norway</option>
           <option value="Oman">Oman</option>
           <option value="Pakistan">Pakistan</option>
           <option value="Palau">Palau</option>
           <option value="Panama">Panama</option>
           <option value="Papua">Papua</option>
           <option value="New Guinea">New Guinea</option>
           <option value="Paraguay">Paraguay</option>
           <option value="Peru">Peru</option>
           <option value="Philippines">Philippines</option>
           <option value="Poland">Poland</option>
           <option value="Portugal">Portugal</option>
           <option value="Qatar">Qatar</option>
           <option value="Romania">Romania</option>
           <option value="Russian Federation">Russian Federation</option>
           <option value="Rwanda">Rwanda</option>
           <option value="St Kitts & Nevis">St Kitts & Nevis</option>
           <option value="St Lucia">St Lucia</option>
           <option value="Saint Vincent & the Grenadines Samoa">Saint Vincent & the Grenadines Samoa</option>
           <option value="San Marino">San Marino</option>
           <option value="Sao Tome & Principe">Sao Tome & Principe</option>
           <option value="Saudi Arabia">Saudi Arabia</option>
           <option value="Senegal">Senegal</option>
           <option value="Serbia">Serbia</option>
           <option value="Seychelles">Seychelles</option>
           <option value="Sierra Leone">Sierra Leone</option>
           <option value="Singapore">Singapore</option>
           <option value="Slovakia">Slovakia</option>
           <option value="Slovenia">Slovenia</option>
           <option value="Solomon Islands">Solomon Islands</option>
           <option value="Somalia">Somalia</option>
           <option value="South Africa">South Africa</option>
           <option value="Spain">Spain</option>
           <option value="Sri Lanka Sudan">Sri Lanka Sudan</option>
           <option value="Suriname">Suriname</option>
           <option value="Swaziland">Swaziland</option>
           <option value="Sweden">Sweden</option>
           <option value="Switzerland">Switzerland</option>
           <option value="Syria">Syria</option>
           <option value="TaiwanTajikistan">TaiwanTajikistan</option>
           <option value="Tanzania">Tanzania</option>
           <option value="Thailand">Thailand</option>
           <option value="Togo">Togo</option>
           <option value="Tonga">Tonga</option>
           <option value="Trinidad & Tobago">Trinidad & Tobago</option>
           <option value="Tunisia">Tunisia</option>
           <option value="Turkey">Turkey</option>
           <option value="Turkmenistan">Turkmenistan</option>
           <option value="Tuvalu">Tuvalu</option>
           <option value="Uganda">Uganda</option>
           <option value="Ukraine">Ukraine</option>
           <option value="United Arab Emirates">United Arab Emirates</option>
           <option value="United Kingdom">United Kingdom</option>
           <option value="United States">United States</option>
           <option value="Uruguay">Uruguay</option>
           <option value="Uzbekistan">Uzbekistan</option>
           <option value="Vanuatu">Vanuatu</option>
           <option value="Vatican City">Vatican City</option>
           <option value="Venezuela">Venezuela</option>
           <option value="Vietnam">Vietnam</option>
           <option value="Yemen">Yemen</option>
           <option value="Zambia">Zambia</option>
           <option value="Zimbabwe">Zimbabwe</option>
         </select>
       </td>
     </tr>
    <tr>
      <td>State/Province:</td>
      <td><input type="text" name="state" maxlength="100"/></td>
    </tr>
    <tr>
      <td>City:</td>
      <td><input type="text" name="city" maxlength="100"/></td>
    </tr>
    <tr>
      <td>Email:<span class="red">*</span></td>
      <td><input type="text" name="email" maxlength="255"/></td>
    </tr>
      <tr>
      <td align="center"><input type="submit" name="submit" value="Register"/></td>
      <td>Aleady have an account?  <a href="login.php">Login</a>.</td>
    </tr>
</form>
  </table>
<center>
<ul>
<li>
<a href="index.php">Home</a>
</li>
 | 
<li>
<a href="about.php">About</a>
</li>
 | 
<li>
<a href="developer.php">Developer</a>
</li>
 | 
<li>
<a href="register.php">Register</a>
</li>
 | 
<li>
<a href="login.php">Login</a>
</li>
</ul>
</center>
</body>
</html>


I'm not sure what to do, but I hope you wonderful experienced PHP developers can help.

Is This A Good Question/Topic? 0
  • +

Replies To: Registration Form

#2 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: Registration Form

Posted 04 June 2010 - 03:47 PM

The error is saying the the file doesn't exist, are you sure you have the directory correct, and the file is really there.
Was This Post Helpful? 1
  • +
  • -

#3 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 04:00 PM

Yeah I'm sure. It's in the right directory and is the right file name. When I go to the URL for the PHP file that puts the information in the database the web browser says the file doesn't exist. Would you need that file.
Was This Post Helpful? 0
  • +
  • -

#4 KingCuddles  Icon User is offline

  • D.I.C Regular

Reputation: 176
  • View blog
  • Posts: 496
  • Joined: 20-December 08

Re: Registration Form

Posted 04 June 2010 - 04:05 PM

Yeah try that?
Was This Post Helpful? 1
  • +
  • -

#5 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 04:14 PM

Okay here it is. It's not complete:
<?php

include"scripts/connect_to_mysql.php";

$button = $_POST['submit'];

if ($button)
{
	$fist_name = $_POST['first_name'];
	$last_name = $_POST['last_name'];
	$password = $_POST['password'];
	$confirm_password = $_POST['confirm_password'];
	$country = $_POST['country'];
	$state = $_POST['state'];
	$city = $_POST['city'];
	$email = $_POST['email'];
	
	if ($fist_name && $last_name && $password && confirm_password && $email)
	{
		
		if ($password == $confirm_password)
		{
			
		include ("scripts/connect_to_mysql.php");
		$query = mysql_query ("SELECT * first_name AND last_name WHERE first_name='$first_name' AND last_name='$last_name'");
		$numrows = mysql_num_rows ($query);
		}
else
echo "Your desired password did not match with the confirmed password.";
	}
	else
	echo "You did not fill in all of your details.";
	
	}
?>

Was This Post Helpful? 0
  • +
  • -

#6 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Registration Form

Posted 04 June 2010 - 04:45 PM

Is the file you try to include (submit_data.php) in the correct directory ?

Error from your site :
(include_path='.:/usr/lib/php:/usr/local/lib/php')

Your code:
<?php include_once"scripts/submit_data.php";?>


Sow your file (submit_data.php) must be located at /usr/lib/php:/usr/local/lib/php/scripts/


You can change the include path with set_include_path
Was This Post Helpful? 1
  • +
  • -

#7 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 04:50 PM

I fixed part of it. The code that you should that I gave to you guys was the problem. I switched the directories. Now though if you click on the "Register" button it takes you to a website produced by my web host. Could you help me with that.
Was This Post Helpful? 0
  • +
  • -

#8 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Registration Form

Posted 04 June 2010 - 05:02 PM

View PostVB.Terry, on 04 June 2010 - 03:50 PM, said:

I fixed part of it. The code that you should that I gave to you guys was the problem. I switched the directories. Now though if you click on the "Register" button it takes you to a website produced by my web host. Could you help me with that.


When the form is submitted, you send it to register_account.php. Is this the file you posted in your first post ?
<form action="register_account.php" method="post" enctype="multipart/form-data">


I see also register.php as link, maybe wrong name ?

This post has been edited by webpeater: 04 June 2010 - 05:03 PM

Was This Post Helpful? 1
  • +
  • -

#9 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Registration Form

Posted 04 June 2010 - 05:08 PM

View PostVB.Terry, on 04 June 2010 - 03:14 PM, said:

Okay here it is. It's not complete:
<?php

include"scripts/connect_to_mysql.php";

$button = $_POST['submit'];

if ($button)
{
	$fist_name = $_POST['first_name'];
	$last_name = $_POST['last_name'];
	$password = $_POST['password'];
	$confirm_password = $_POST['confirm_password'];
	$country = $_POST['country'];
	$state = $_POST['state'];
	$city = $_POST['city'];
	$email = $_POST['email'];
	
	if ($fist_name && $last_name && $password && confirm_password && $email)
	{
		
		if ($password == $confirm_password)
		{
			
		include ("scripts/connect_to_mysql.php");
		$query = mysql_query ("SELECT * first_name AND last_name WHERE first_name='$first_name' AND last_name='$last_name'");
		$numrows = mysql_num_rows ($query);
		}
else
echo "Your desired password did not match with the confirmed password.";
	}
	else
	echo "You did not fill in all of your details.";
	
	}
?>


You may also add some security to SQL injection.

Take a look at myql_real_escape_strings @ w3schools
Was This Post Helpful? 1
  • +
  • -

#10 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 05:10 PM

View Postwebpeater, on 04 June 2010 - 06:02 PM, said:

View PostVB.Terry, on 04 June 2010 - 03:50 PM, said:

I fixed part of it. The code that you should that I gave to you guys was the problem. I switched the directories. Now though if you click on the "Register" button it takes you to a website produced by my web host. Could you help me with that.


When the form is submitted, you send it to register_account.php. Is this the file you posted in your first post ?
<form action="register_account.php" method="post" enctype="multipart/form-data">


I see also register.php as link, maybe wrong name ?

Thanks. It worked.
Was This Post Helpful? 0
  • +
  • -

#11 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 06:02 PM

I have another question with the form. When the person enters their information in the form and submits it says you've been added, but when I go on my database and look it don't say you are. Here is the updated PHP code for the previous files:
<?php

include"connect.php";

$button = $_POST['submit'];

if ($button)
{
	$fist_name = $_POST['first_name'];
	$last_name = $_POST['last_name'];
	$password = $_POST['password'];
	$confirm_password = $_POST['confirm_password'];
	$country = $_POST['country'];
	$state = $_POST['state'];
	$city = $_POST['city'];
	$email = $_POST['email'];
	
	if ($fist_name && $last_name && $password && confirm_password && $email)
	{
				if ($password == $confirm_password){
		if (strstr($email, "@") && strstr($email, "."))
		{
		
				include_once ("connect.php");
		$query = mysql_query ("SELECT * FROM myMembers WHERE email='$email'") or die(mysql_error());
		$numrows = mysql_num_rows ($query);
		if ($numrows == 0)
		{
			
			$password = md5($password);
			
			$register = mysql_query("INSERT INTO myMembers VALUES ('', '$fist_name', '$last_name', '$country', '$state', '$city', '$email', '$password')");
			
			echo "You are now registered.";
			
		}
		else 
		echo "That email is taken.";
		
		}
		else
			echo "Not a valid email.";

		}
else
echo "Your desired password did not match with the confirmed password.";
	}
	else
	echo "You did not fill in all of your details.";
	
	}
?>

Was This Post Helpful? 0
  • +
  • -

#12 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Registration Form

Posted 04 June 2010 - 06:59 PM

From mysql_query on PHP

Quote

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.


So print something with $register, to check if your values are realy added.
like
if(! $result)
print 'Error Regestration Failed';

If you get to see that error, there must be something wrong with your query

This post has been edited by webpeater: 04 June 2010 - 07:00 PM

Was This Post Helpful? 0
  • +
  • -

#13 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 07:03 PM

View Postwebpeater, on 04 June 2010 - 07:59 PM, said:

From mysql_query on PHP

Quote

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.


So print something with $register, to check if your values are realy added.
like
if(! $result)
print 'Error Regestration Failed';

If you get to see that error, there must be something wrong with your query

I'm sorry but I don't understand. After it adds you add add code with $register and other stuff to see if the person is really registered. When the person tries to register themselves on my website it says that their registered when their actually not. I want to know how I can get the information I'm taking from the form added to my database. I'm not sure why it's not working.
Was This Post Helpful? 0
  • +
  • -

#14 webpeater  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 95
  • Joined: 04-June 10

Re: Registration Form

Posted 04 June 2010 - 07:13 PM

View PostVB.Terry, on 04 June 2010 - 06:03 PM, said:

View Postwebpeater, on 04 June 2010 - 07:59 PM, said:

From mysql_query on PHP

Quote

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.


So print something with $register, to check if your values are realy added.
like
if(! $result)
print 'Error Regestration Failed';

If you get to see that error, there must be something wrong with your query

I'm sorry but I don't understand. After it adds you add add code with $register and other stuff to see if the person is really registered. When the person tries to register themselves on my website it says that their registered when their actually not. I want to know how I can get the information I'm taking from the form added to my database. I'm not sure why it's not working.


The code i suggested, checks if your information from your form is added. (mysql_query("INSERT ...") returns if the insert was succesful or not.

You say, the information from the form is not added to your database, i guess there is something wrong with your query.
Maybe you could at the colums where you are inserting your values in your query. => Insert @ w3schools


EDIT : The variable $result above must be $registration.
That boolean says if your insert query was succesful or not

This post has been edited by webpeater: 04 June 2010 - 07:14 PM

Was This Post Helpful? 1
  • +
  • -

#15 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Registration Form

Posted 04 June 2010 - 07:18 PM

View Postwebpeater, on 04 June 2010 - 08:13 PM, said:

View PostVB.Terry, on 04 June 2010 - 06:03 PM, said:

View Postwebpeater, on 04 June 2010 - 07:59 PM, said:

From mysql_query on PHP

Quote

For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.


So print something with $register, to check if your values are realy added.
like
if(! $result)
print 'Error Regestration Failed';

If you get to see that error, there must be something wrong with your query

I'm sorry but I don't understand. After it adds you add add code with $register and other stuff to see if the person is really registered. When the person tries to register themselves on my website it says that their registered when their actually not. I want to know how I can get the information I'm taking from the form added to my database. I'm not sure why it's not working.


The code i suggested, checks if your information from your form is added. (mysql_query("INSERT ...") returns if the insert was succesful or not.

You say, the information from the form is not added to your database, i guess there is something wrong with your query.
Maybe you could at the colums where you are inserting your values in your query. => Insert @ w3schools


EDIT : The variable $result above must be $registration.
That boolean says if your insert query was succesful or not

Okay. I understand what your saying now. I'll have to try your code later because of the problem I'm having with the header script.

This post has been edited by VB.Terry: 04 June 2010 - 07:19 PM

Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »