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
https://forums.phpfreaks.com/topic/244630-help/
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
https://forums.phpfreaks.com/topic/244630-help/#findComment-1256484
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.