Jump to content

Help with simple Print Variable


todayme

Recommended Posts

I have managed to get the values of the drop down boxes using java script.  I have put them into a variable and now I am trying to see if they pass to the PHP script below.  I am a beginner, can someone tell me what I am doing wrong with the script below.

 

<?

 

$dbindustry = $cool_industry

$dbstate = $cool_state

 

 

Print '.$dbindustry.'

Print '.$dbstate.'

 

?>

Link to comment
https://forums.phpfreaks.com/topic/41210-help-with-simple-print-variable/
Share on other sites

Remove the quotes from the statements. Variables within single quotes are not evaluated, but are treated as literals.

 

<?php
Print $dbindustry.'<br>';
Print $dbstate;
?>

 

Remember, all PHP statements end with a semi-colon.

 

Ken

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.