Ross wrote:
I want to write a string to a variable and use $_POST or $_GET to retrieve it on another page.

I keep gettting an undefined index errror. Can someone show me how this is done?

Do I have to use session_start() ?

This would be ideal.


Have checked the documentation, can't find a really basic example.

Well you didn't post any code, so I can't give you specifics, but a crude example is :


<?php
  session_start();
  $_SESSION['some-string'] = "hello I am a string";
  echo '<a href="page2.php">Read the string</a>';
?>

<?php
  session_start();
  echo 'String is : '.$_SESSION['some-string'];
?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to