Jump to content

form validation - NOOB


aeafisme23

Recommended Posts

First of all I have researched on phpfreaks and to no avail there was nothing as "BASIC" as i needed.

I just want SIMPLE error handling messages to go to the corresponding column, i do not want it above, below, i want it in specific columns where i stated i need below. NO JAVASCRIPT. Keep it noobish for me, meaning no db interaction just simple :)  THANKS :)

Contactform.php

[code]
<form name="cform" method="post" action="formdisplay.php">
<table><tr>
<td><p>First Name:</p></td>
<td><input type="text" maxlength="25" name="firstname"></td>
<td>if error i want it to go here on submit, I DO not want javascript at all, and i do not want it
to go to display results, i wanted it validated here using php</td>
</tr>
<tr>
<td><p>Last Name:</p></td>
<td><input type="text" maxlength="25" name="lastname"></td>
<td>error handling</td>
</tr>
</table>
</form>
[/code]


Formdisplay.php

[code]
<p>Display Results</p>
<?php
echo "<p>Name: " . $firstname . " " . $lastname . "</p>";
?>
[/code]


http://www.phpfreaks.com/forums/index.php/topic,36973.0.html  I thought the main posting was goign to help me but only found out that it was very very advanced for a noob such as myself. Much help is appreciated.
Link to comment
Share on other sites

What criteria do you want to use to check against the data & validate the posted form values? (If not from a db)

Also... http://www.php.net is a good place to start before even doing anything. Why tackle such things if you have not out in the effort to learn the basics? And yes, such validation can be done using the most basic understanding/experience with PHP.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.