Jump to content

passing variables


sanchez77

Recommended Posts

What is the best way to pass variables from one php page to another?

 

For Ex:

 

page1.php queries a table, retrieves the value, sets it to $field1, how do you pass $field1 to page2.php?

 

page 1


$sql = "SELECT field1 FROM table WHERE `id` = 1"; 
$result = mysql_fetch_array($result);
$field1 = $result[field1];

 

What is the best way to pass $field1 to page2.php?

Link to comment
https://forums.phpfreaks.com/topic/169407-passing-variables/
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.