Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

web variable question?

Posted on 2003-11-24
3
Medium Priority
?
241 Views
Last Modified: 2008-07-03
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.
0
Comment
Question by:zouwei
  • 2
3 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9815248
<?php
$ssn = $_POST['firstname'];

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

?>
0
 
LVL 24

Accepted Solution

by:
shivsa earned 500 total points
ID: 9815251
sorry type mistake.
<?php
$ssn = $_POST['ssn'];
echo( "<h1> hello $ssn !</h1>"; " );
?>
0
 

Expert Comment

by:GMorgan
ID: 9819843
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
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question