Solved

web variable question?

Posted on 2003-11-24
3
232 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now