Link to home
Start Free TrialLog in
Avatar of zouwei
zouwei

asked on

web variable question?

Hi export, I just start to use php and has a web variable question:

I have this php file:
<html>
<head>
 <title>
   PHP take ssn input
 </title>
</head>
<body>
<pre>
  <?php
    echo "<h1> hello $ssn !</h1>"; ?>
</pre>
</body>
</html>


and I run this URL:
   http://194.128.100.100/e5_1.php?ssn=123454


What I get is:

hello !.

The $ssn value doesn't display.

Can you help me out here?

Thanks a lot.
Avatar of shivsa
shivsa
Flag of United States of America image

<?php
$ssn = $_POST['firstname'];

echo( "<h1> hello $ssn !</h1>"; " );

?>
ASKER CERTIFIED SOLUTION
Avatar of shivsa
shivsa
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GMorgan
GMorgan

I always find it better if you seperate the html from the php...not that it makes it work any different :)  I would suggest this....

<? $ssn = $_POST['ssn']; ?>

<h1> hello <? $ssn; ?></h1>


but again that's just a suggestion

Cheers
Glen