Click here to Skip to main content
15,886,761 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Possible md5 encrypting error Pin
SRJ9223-Apr-10 12:26
SRJ9223-Apr-10 12:26 
QuestionHow to add new row to gridview at first? Pin
lamiaa_12316-Apr-10 5:54
lamiaa_12316-Apr-10 5:54 
AnswerRe: How to add new row to gridview at first? Pin
HimanshuJoshi18-Apr-10 19:49
HimanshuJoshi18-Apr-10 19:49 
Questionwindow.open The Pop window can be resize as per the content of the page Pin
Sandesh M Patil14-Apr-10 4:16
Sandesh M Patil14-Apr-10 4:16 
AnswerRe: window.open The Pop window can be resize as per the content of the page Pin
Dr.Walt Fair, PE23-Apr-10 16:22
professionalDr.Walt Fair, PE23-Apr-10 16:22 
QuestionPositioning errors :S Pin
SRJ9213-Apr-10 11:48
SRJ9213-Apr-10 11:48 
AnswerRe: Positioning errors :S Pin
enhzflep19-Apr-10 20:30
enhzflep19-Apr-10 20:30 
AnswerRe: Positioning errors :S Pin
xTraCD21-Apr-10 6:16
xTraCD21-Apr-10 6:16 
I try to write in a way people understand simply, so if its a little "fluffy" then I apologize in advance.


I'd probably make a function that scans the inputs from the form, and checks them.
Then the second part of the function would be to spit out the errors that were made.

Kind of like (e.g.) if the username space is blank, then report an error. The div id 'errors'
would be where your errors would be spat out.

(Registration page)
<div id="regform">
   <div id="errors">
 &nbsp;&nbsp;<?php
 &nbsp;&nbsp;validateInputs();
&nbsp;&nbsp;&nbsp;?>
   </div>
<?php
include("register.php");
?>
</div>


(Function, theory I guess)
function validateInputs(){
   $username = $__POST["username"]; #name referring to the entities of <input name="nameHere" >
...php script that checks the length of the input, and for false positives, like a bunch of spaces,
or perhaps a name consisting of one character, or patterns like that. Also use it to check if the username
is being used or not...Then echo out what errors were triggered, on that page, and if you have no errors, 
you could give a check image or something. I'm not too sure. 
}


hope this helps.

I heard you can also do form validation with jQuery
http://www.webreference.com/programming/javascript/jquery/form_validation/[^]
GeneralRe: Positioning errors :S Pin
SRJ9221-Apr-10 11:37
SRJ9221-Apr-10 11:37 
Questionnot sending other email account in mail() Pin
jhyn12-Apr-10 17:44
jhyn12-Apr-10 17:44 
AnswerRe: not sending other email account in mail() Pin
Michel Godfroid19-Apr-10 21:46
Michel Godfroid19-Apr-10 21:46 
GeneralRe: not sending other email account in mail() Pin
jhyn20-Apr-10 15:40
jhyn20-Apr-10 15:40 
Questionhow to read .zip file in php Pin
udch12-Apr-10 4:03
udch12-Apr-10 4:03 
AnswerRe: how to read .zip file in php Pin
Graham Breach12-Apr-10 4:20
Graham Breach12-Apr-10 4:20 
GeneralRe: how to read .zip file in php Pin
udch12-Apr-10 5:12
udch12-Apr-10 5:12 
QuestionWeb interface Pin
josephong8-Apr-10 21:10
josephong8-Apr-10 21:10 
QuestionVisual Studio Solution In GCC Pin
darc koder6-Apr-10 7:10
darc koder6-Apr-10 7:10 
AnswerRe: Visual Studio Solution In GCC Pin
N a v a n e e t h6-Apr-10 15:56
N a v a n e e t h6-Apr-10 15:56 
QuestionDatabase search function in php Pin
offroaderdan6-Apr-10 4:24
offroaderdan6-Apr-10 4:24 
AnswerRe: Database search function in php Pin
cjoki6-Apr-10 6:17
cjoki6-Apr-10 6:17 
AnswerRe: Database search function in php Pin
Eddy Vluggen7-Apr-10 3:11
professionalEddy Vluggen7-Apr-10 3:11 
AnswerRe: Database search function in php Pin
enhzflep7-Apr-10 4:35
enhzflep7-Apr-10 4:35 
Questionsimple web crawler Pin
gouravrinks3-Apr-10 4:42
gouravrinks3-Apr-10 4:42 
AnswerRe: simple web crawler Pin
Moak24-Apr-10 2:08
Moak24-Apr-10 2:08 
Questioncopy web page Pin
udch1-Apr-10 22:47
udch1-Apr-10 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.