Jump to content

[SOLVED] sending a variable


mcdof001

Recommended Posts

Hi, Sorry To Bother You Again! I know how to send an input text to another php and a database, but i do not know how to send an already set variable on a php page to another php page.

This is what I'm using :-

<form action="compare.php" method="post" enctype="multipart/form-data" name="form1">
<input name="rating" type="hidden" id="rating" value="<? echo "$rating" ?>">
  <input name="Compare Results" type="submit" id="Compare Results" value="Compare Results">
</form>

I have got 'echo "$rat";' and '$rat = $_GET["rating"];' on compare.php.

Why won't that work and has anybody got any other suggestions please?

 

Link to comment
https://forums.phpfreaks.com/topic/71161-solved-sending-a-variable/
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.