Jump to content

php echo problems!


djcritch

Recommended Posts

ok so:

 

a.html contains the following form:

 

<form action="a.php" method="get">
<input type="text" name="text" size="50">
<br />
<br />
  <select size="1" name="num1">
  <option>0</option>
  <option>1</option>
  <option>2</option>
  <option>3</option>
  </select>
  <select size="1" name="num2">
  <option>0</option>
  <option>5</option>
  <option>10</option>
  </select>
<br />
<br />
<input type="submit">
</form>

 

a.php is a frame set calling b.php and c.php a as follows:

 

<html>

<frameset rows="62px,90%">

  <frame src="b.php">
  <frame src="c.php">

</frameset>

</html>

 

now what i want to do is echo the information from a.php into b.php and c.php so that it can be called so:

 

b.php will call the following:

<?php echo $_GET["text"]; ?>
<?php echo $_GET["num1"]; ?>
<?php echo $_GET["num2"]; ?> 

 

and c.php will also callte following:

 

<?php echo $_GET["text"]; ?>
<?php echo $_GET["num1"]; ?>
<?php echo $_GET["num2"]; ?> 

 

hope this makes it clearer

 

Dave.

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/96743-php-echo-problems/#findComment-495085
Share on other sites

I guess you don't need sessions then as stated above ^. It seems like that set up should work. Is there an error of some kind? Or, if you need to. You would just add the code following to a.php:

 

session_start();

$_SESSION['variableName'] = $_GET['variableName'];
$_SESSION['variableName1'] = $_GET['variableName1'];
$_SESSION['variableName2'] = $_GET['variableName2'];
$_SESSION['variableName3'] = $_GET['variableName3'];

 

and then whenever you want to echo the information in b.php, and c.php you would do the following:

 

<?php echo $_SESSION['variableName']; ?>

Link to comment
https://forums.phpfreaks.com/topic/96743-php-echo-problems/#findComment-495109
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.