Jump to content

form validation


phpfan101

Recommended Posts

so, i have started my first php project, a fully featured Forum.

I ran into trouble, and have been stumped for almost a week, I'm using php/mysql.

 

so I made the post category form.

 

made sure it works.

 

I even have all of the fields set to be validated in php.

 

But, i don't want that because I would prefer to just send a js alert when a user hits submit, so the page never changes, and they can just hit "ok" on the alert and edit the info, not so it changes pages and the user has to retype everything  :-\

 

<form method='post'>

<table width='100%'>
<tr>
	<td width='25%'>Name:</td>
	<td width='25%'>
	<input type='text' name='name' id='name'  size='40' maxlength='15'>
	</td>
</tr>

<tr>

	<td width='25%'>Description:</td>
	<td width='25%'>
	<textarea name='desc' cols='60' rows='4' ></textarea>
	</td>
</tr>

	<tr>

	<td width='25%'>access:</td>
	<td width='25%'>
	<textarea name='access' size='5' maxlength='2'></textarea>
	</td>
</tr>


<tr>
	<td width='25%'></td>

	<td width='25%'>

	<input type='submit' name='submitcategory' value='Submit Category'> 
	</td>
</tr>
</table>
</form>

 

 

 

So there's the form itself, any help is appreciated!!!

Link to comment
https://forums.phpfreaks.com/topic/184481-form-validation/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.