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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
<? $ssn = $_POST['ssn']; ?>
<h1> hello <? $ssn; ?></h1>
but again that's just a suggestion
Cheers
Glen
$ssn = $_POST['firstname'];
echo( "<h1> hello $ssn !</h1>"; " );
?>