Page 1 of 1
storing post values?
Posted: Mon Aug 02, 2004 1:19 am
by dwfait
whenever i try to do:
$ssppluser = "$_POST["user"]"
i get the error:
Parse error: parse error, unexpected '\"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in action.php on line 2
Posted: Mon Aug 02, 2004 2:18 am
by djot
Code: Select all
<?php
$ssppluser = $_POST["user"];
?>
Posted: Mon Aug 02, 2004 9:15 am
by dwfait
Thank you, it works

Posted: Mon Aug 02, 2004 9:58 am
by hawleyjr
If you are just using $ssppluser as a reference to the $_POST[] var use the following code:
Code: Select all
<?php
$ssppluser = &$_POST['user'];
?>
Posted: Mon Aug 02, 2004 11:10 am
by d3ad1ysp0rk
Why would you be? I don't think references come after learning how to set variables. I think it's after OOP in the php-learning-trend

Posted: Mon Aug 02, 2004 12:40 pm
by hawleyjr
Ha! good point...force of habit...