Problems with PHP and forms

This is a discussion on Problems with PHP and forms within the PHP General forums, part of the PHP Programming Forums category; I'm trying to pass data from an HTML form to PHP. Later, I write the data to a database. ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-10-2004
L.Ray
 
Posts: n/a
Default Problems with PHP and forms

I'm trying to pass data from an HTML form to PHP. Later, I write the
data to a database. Please look at this simple html form, php code,
and the output and tell me what I'm doing wrong. Thanks in advance:


<!-- Sample.html -->
<html>
<body>

<form action="simple.php" method="POST" >
Name: <input type="text" name="wName" size="20"><br>
Email: <input type="text" name="wEmail" size="20"><br>
<input type="submit" value="submit" name="submit">
</form>

</body>
</html>

<!-- simple.php -->
<HTML>
<body>
<?php
if (!$wName || !$wEmail )
{
echo "You have not entered all the required details.<br>"
."Please go back and enter data in all fields.<br>";
echo ".$wName., .$wEmail.";
exit;
}
?>
</body>
</HTML>

<!-- here is the output from the above code -->

You have not entered all the required details.
Please go back and enter data in all fields.
..., ..
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0