Jump to content

Help!


deathy150

Recommended Posts

I am creating a login form and when i return the registration details on my register page it does nothing - can anybody help?

 

Here's the code for the registration page:



<?php


$return = $_POST['return'];

$name = $_POST['name'];
$username = $_POST['username'];

$password = $_POST['password'];
$rpassword = $_POST['rpassword'];



if($return)
{

//this is just to output what the user enterd so that i can see if its working but is not...

	echo "$username/$name/$password/$rpassword";		

}

?>

<html>

<from action='Register.php' method='POST'>
<table>

	<tr>

		<td>

		<font face='arial'/>
		Enter Name:

		</td>
		<td>

		<input type='text' name='name'>

		</td>

	</tr>
	<tr>

		<td>

		<font face='arial'/>
		Enter username:

		</td>
		<td>

		<input type='text' name='username'>

		</td>

	</tr>
	<tr>

		<td>

		<font face='arial'/>
		Enter password:

		</td>
		<td>

		<input type='password' name='password'>

		</td>

	</tr>
	<tr>

		<td>

		<font face='arial'/>
		Enter password again:

		</td>
		<td>

		<input type='password' name='rpassword'>

		</td>

	</tr>

	</font>

</table>

<p>

<input type='submit' name='return' value='Register'>

</p>

</form>

</html>

Link to comment
Share on other sites

you didnt close any of your input tags?

anyway its form not from tag.

 

change your page to this code.


<?php


$return = $_POST['return'];

$name = $_POST['name'];
$username = $_POST['username'];

$password = $_POST['password'];
$rpassword = $_POST['rpassword'];



if($return)
   {

//this is just to output what the user enterd so that i can see if its working but is not...
            
      echo $username. "/" .$name. "/" .$password. "/" .$rpassword;      
            
   }
      
?>

<html>
<form action='Register.php' method='POST'>
   <table>
   
      <tr>
      
         <td>
         
         <font face='arial'/>
         Enter Name:
         
         </td>
         <td>
         
         <input type='text' name='name'/>
         
         </td>
      
      </tr>
      <tr>
      
         <td>
         
         <font face='arial'/>
         Enter username:
         
         </td>
         <td>
         
         <input type='text' name='username'/>
         
         </td>
      
      </tr>
      <tr>
      
         <td>
         
         <font face='arial'/>
         Enter password:
         
         </td>
         <td>
         
         <input type='password' name='password'/>
         
         </td>
      
      </tr>
      <tr>
      
         <td>
         
         <font face='arial'/>
         Enter password again:
         
         </td>
         <td>
         
         <input type='password' name='rpassword'/>
         
         </td>
      
      </tr>
      
      </font>
      
   </table>

   <p>

   <input type='submit' name='return' value='Register'/>
   
   </p>
   
</form>

</html>

 

 

edit: i re-edited the script. please use the new one :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.