Jump to content


Photo

Variable accessing problem.


  • Please log in to reply
1 reply to this topic

#1 ramu_rp2005

ramu_rp2005
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 08 May 2006 - 06:33 AM

Hi php gurus,
I'm having a problem in accessing the values of the variable from the previous form. The previous form variable is defined below:

if(isset($pstreamname)) {
?>
             <tr>
                 <td valign=top align=right><tt><b>Stream Name</b></td>
                 <td valign=top><input type="text" name="streamname" size="30"><br></td>
             </tr>
   
<?
}


and accessing the above variable is as below.

$streamname=@$_REQUEST['streamname'];
echo "Streamname is $streamname";

but its not echoing anything.can anyone tell me why and wht to do? I've added the error reporting also at the top.no errors,plz help.

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1); 
?>


#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 May 2006 - 08:51 AM

You wont get any errors becuase your are suppressing them, as you have an @ symbol infront of your $_REQUEST['streamname'] variable, as seen below:
$streamname=@$_REQUEST['streamname'];
When you remove the @ symbol you may get a notice message

Also it appreas that you dont have a submit button in order to submit the form data. If you have nothing for submitting a form then your data will never be sent as you havnt told the browser to submit the form data.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users