Jump to content

Syntax Error


princeofpersia

Recommended Posts

Hi guys,

 

Im trying to insert a session into a html select <option> but never done it before, can you help me to see how?

 

I have a code here but there is a syntax error

 

if($_SESSION['name']){
echo "<option value=$_SESSION['name']>$_SESSION['name']</option>";
}

 

Thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/254879-syntax-error/
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.