Solved

web variable question?

Posted on 2003-11-24
3
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 125 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
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.

729 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