Jump to content

Please help to popup, lost data


Shawn

Recommended Posts

In main pages. I get to data, $id and $pwIt will popup a new windows(login.php) after I clicked submit. main.php<form name="form1" method="post" action="login.php"><input name="id" type="text" id="id" size="8" maxlength="8" style="font-size:12px"><input name="pw" type="password" id="pw" style="font-size:12px" value="" size="8"><a href="#" onClick="popwin=window.open('login.php','popwin','scrollbars, width=850,height=650');"> <input type="image" src="images/submit.gif" name="submit" value="submit" onClick="()">$id and $pw can not put into login.php, please help to solve. Thanks a lot.

Link to comment
Share on other sites

Put it in a code block like this:Main.php

<form method="post" action="login.php"><input name="id" type="text" id="id" size="8" maxlength="8" style="font-size:12px"><input name="pw" type="password" id="pw" style="font-size:12px" value="" size="8"><a href="#" onClick="popwin=window.open('login.php','popwin','scrollbars, width=850,height=650');"><input type="image" src="images/submit.gif" name="submit" value="submit" onClick="()"><input type="submit" value="submit">

login.php

<?php$id = "$_POST['id']";$pw = "$_POST['pw']";?>

use the global command $_POST[''] or $_GET[''] for forums ;-]Also, I edited main.php you had extra things and were missing things. This should work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...