Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

transfering the variables to another page

Links for php scripts

Moderators: macek, egami, gesf

Postby bezmond » Tue Jan 13, 2004 10:06 am

is this the whole pages code? If so, you are missing the <form> tags and so on...

User avatar
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK

Postby sigix » Tue Jan 13, 2004 10:43 am

Code: Select all
echo "<form action=\"validate.php\" method=\"post\">";


  echo "<INPUT TYPE=\"hidden\" NAME=\"x1\" VALUE=\"$x1\">";
  echo '<input type=submit value=go>';
  echo '</form>';

Code: Select all
#validate.php page
echo "The value received x1:".$_POST['x1'];
php-forum Active User
php-forum Active User
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Postby swirlee » Tue Jan 13, 2004 10:48 am

The hidden form field method only works if you're using forms. If not, you should be using Sessions.
User avatar
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.