944,059 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3370
  • PHP RSS
Jul 15th, 2007
0

Regarding: Pass one to Another Page values with coding enclosed

Expand Post »
hi
i have write the php language code. The login form creation. The validation part is ok.. but data is not pass to one page to another page. I have used $_REQUEST and $_Post method but not working.. any body replay me..

the following codes..

THe First file is login.php. in the file having login details.. the following code s are

<html>
<head>
<title>Welcome to Login page</Title>
<script language="javascript" type="text/javascript">
{
function checking()
{
if ((document.log.username.value=="")||(document.log.password.value==""))
{
alert("user name/password cannot be empty");
document.log.username.focus();
return false;
}
}
}
</script>
</head>
<body>
<br><br><br><br><br><br><br>
<form action="welcome.php" name="log" method="post" onsubmit="return checking()">

<table border="2" align="center" cellspacing=2 cellpadding =3 bgcolor="gray">
<tr>
<td>User Name </td>
<td><input type="text" id="username" name="username"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" id="password" name="password"></td>
</tr>
<tr cellspam=2>
<td > <input type="submit" name="login" value="Login">
<input type="reset" name="reset" value="Reset"> </td>
<td>New User <a href="reg.php">Click Here</a></td>
</tr>
</table> </form></body></html>


The Other file welcome.php. codes are

<html>
<head>
<title></title>
</head>
<body alink="blue" vlink="blue" link="blue">
<p align="right">
<a href="profile.php"> Edit Profile</a>
<a href="signout.php"> Sign Out</a> </p>
<B> Welcome to Your Page
</B>
<?php
echo $_POST['username'];
//echo $_REQUEST['username'];
?> </body> </html>


Reply me immediately if possible. or any other setting change coding part and editor part if anybody tell

Thanks
muruganasm
Last edited by muruganasm; Jul 15th, 2007 at 3:11 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
muruganasm is offline Offline
3 posts
since Jul 2007
Jul 15th, 2007
0

Re: Regarding: Pass one to Another Page values with coding enclosed

It works fine for me. It just outputs the username. Do you get an error message or something?
Reputation Points: 27
Solved Threads: 14
Junior Poster
Cerberus is offline Offline
162 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: mysql_real_escape_string woes
Next Thread in PHP Forum Timeline: File Uploads





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC