Jump to content

Form validation


Russia

Recommended Posts

Hello, I need a form validation to go with this form:

 

ITS AN INSTALLATION FORM.

 

<form name="input" action="install2.php" method="post">

<span style="float: left;">
Host (Default should be "localhost" without quotes): 
</span>
<span style="float: right;">
<input name="localhost" type="text">
</span>
<br><br>

<span style="float: left;">
Database: (<a href="javascript:alert('This is the name of the database that all the tables and rows will be stored.');">?</a>) 
</span>
<span style="float: right;">
<input name="db" type="text">

</span>
<br><br>

<span style="float: left;">
Database Username: (<a href="javascript:alert('This is the username to access the database to create and update all the tables and rows.');">?</a>) 
</span>
<span style="float: right;">
<input name="db_u" type="text">
</span>
<br><br>


<span style="float: left;">
Database Password: (<a href="javascript:alert('This is the password to access the database.');">?</a>) 

</span>
<span style="float: right;">
<input name="db_p" type="text">
</span>
<br><br>
<hr>


<span style="float: left;">
Administrator Username: (<a href="javascript:alert('This is the administrators username to access the logs and update the website.');">?</a>) 
</span>
<span style="float: right;">
<input name="admin_u" type="text">
</span>
<br><br>

<span style="float: left;">
Administrator Password: (<a href="javascript:alert('This is the administrators username to access the logs and update the website.');">?</a>) 
</span>
<span style="float: right;">
<input name="admin_p" type="text">
</span>
<br><br>
<hr>


<center>
<input name="submit" id="submit" value="Install" type="submit">

</center>



</form>

 

Can someone create a javascript validation that the person cannot procceed until they input all info in the textboxes? Thank You.

Link to comment
Share on other sites

You're not relying only on JavaScript validation, are you?  JavaScript can be turned off in the browser, rendering client-side validation useless.

 

In any event, you should check to see if the form fields' values actually contain values.  If not, then raise an alert.

Link to comment
Share on other sites

This board is for helping people with scripts they are having troubles writing, not for writing scripts for people. If you want someone to write a script for you, try posting in the freelance section. Either that or buy a book on javascript and start learning.

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.