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

Linux, Apache, MySQL, PHP

 
GeneralRe: Data Mapping in PHP Pin
grmihel225-May-11 21:54
grmihel225-May-11 21:54 
GeneralRe: Data Mapping in PHP Pin
cjoki26-May-11 9:43
cjoki26-May-11 9:43 
GeneralIphone Development Training Courses Pin
karnti45451-Jun-12 23:18
karnti45451-Jun-12 23:18 
QuestionMySQL & PHP query: using SELECT * and DISTINCT Pin
whatsa19-May-11 14:25
whatsa19-May-11 14:25 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
Luc Pattyn19-May-11 15:31
sitebuilderLuc Pattyn19-May-11 15:31 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
urtrivedi19-May-11 17:58
urtrivedi19-May-11 17:58 
AnswerRe: MySQL & PHP query: using SELECT * and DISTINCT Pin
cjoki25-May-11 5:41
cjoki25-May-11 5:41 
Questionecho not working Pin
Steve Harp19-May-11 6:05
Steve Harp19-May-11 6:05 
AnswerRe: echo not working Pin
Graham Breach19-May-11 6:25
Graham Breach19-May-11 6:25 
GeneralRe: echo not working Pin
Steve Harp19-May-11 9:50
Steve Harp19-May-11 9:50 
QuestionE-mail tracking in PHP Pin
ubaidur19-May-11 2:30
ubaidur19-May-11 2:30 
AnswerRe: E-mail tracking in PHP Pin
Gerben Jongerius19-May-11 3:47
Gerben Jongerius19-May-11 3:47 
GeneralRe: E-mail tracking in PHP Pin
ubaidur19-May-11 21:06
ubaidur19-May-11 21:06 
AnswerRe: E-mail tracking in PHP Pin
cjoki25-May-11 5:32
cjoki25-May-11 5:32 
QuestionHow to Compile a .PHP File Pin
Sajju201114-May-11 9:06
Sajju201114-May-11 9:06 
AnswerRe: How to Compile a .PHP File Pin
Luc Pattyn14-May-11 11:09
sitebuilderLuc Pattyn14-May-11 11:09 
QuestionBLDMAKE ERROR: Can't find any RVCT installation. Pin
Raj Aryan 100110-May-11 5:03
Raj Aryan 100110-May-11 5:03 
AnswerRe: BLDMAKE ERROR: Can't find any RVCT installation. Pin
Uilleam23-Jul-11 15:17
Uilleam23-Jul-11 15:17 
QuestionExecuting PHP script without leaving the page Pin
AmbiguousName3-May-11 5:03
AmbiguousName3-May-11 5:03 
AnswerRe: Executing PHP script without leaving the page Pin
enhzflep3-May-11 5:09
enhzflep3-May-11 5:09 
AnswerRe: Executing PHP script without leaving the page PinPopular
enhzflep3-May-11 6:39
enhzflep3-May-11 6:39 
QuestionTo use or not to use Pin
astra.20123-May-11 0:10
astra.20123-May-11 0:10 
QuestionPHP Form help Pin
Dave McCool30-Apr-11 8:54
Dave McCool30-Apr-11 8:54 
AnswerRe: PHP Form help Pin
Peter_in_27801-May-11 4:59
professionalPeter_in_27801-May-11 4:59 
Briefly, you will need to add a scrap of javascript to your page. In your <form ... > add something like
onsubmit="return check_fields()"
Somewhere in your page (I put it in the head section) put something like
<script type="text/javascript">
    function check_fields() {
        if (document.getElementById("xxx").checked || document.getElementById("yyy").checked)
	    return true;
	alert("You must select either xxx or yyy!");
	return false;
}
</script>

The function should return true if it's OK to submit. If there's something wrong, spit out an alert to say what the problem is, and return false so the form won't actually be submitted. Obviously, your checking will be more complex than this example which I ripped out of one of my sites.

Cheers,
Peter
If this answers your question, vote for it.
Software rusts. Simon Stephenson, ca 1994.

GeneralRe: PHP Form help Pin
Dave McCool1-May-11 5:08
Dave McCool1-May-11 5:08 

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.