PHP required check box


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PHP required check box
# 1  
Old 09-03-2008
PHP required check box

I am new to PHP scripting.

I have a page with a checkbox and I'd like to make it required before submiting

Here is the code I have for displaying:

<tr>
<td align="center" colspan="4"><font size="2" color="#990000" face="Arial, Helvetica, sans-serif">
By checking this box you agree to the terms above:
</font>
<input type="checkbox" name="LicenseAgreement" value="Yes">
</td>
</tr>

Thanks, I appreciate any help.
# 2  
Old 09-03-2008
This is off-topic for this list.

You need to find a Javascript or PHP site, because you have two options:

1. Do it in Javascript, intercepting the form submission, checking the checkbox, and canceling the submission and popping up a message if it's not selected.

2. Do it in PHP, checking the value on form submission and, if unchecked, bringing back the same page with an error message instead of continuing on to the next page.

Either one is simple and can easily be found with a Google search.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP script that detects if auth is required or not on Apache Splunk

I am currently trying to do a PHP script that detects automatically if Apache Splunk authentication is required or not but I'm having a hard time since HTTP code 303 is always coming back, even if auth is required or not. Here is the script so far; <?php /** * Apache Splunk script to... (4 Replies)
Discussion started by: syrius
4 Replies

2. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

3. AIX

How to check the LPAR in a AIX box ?

I have login into a server, and when i launch this command uname -L. I can see there is a LPAR. But is there anymore commands i can use to get more information on the LPAR ? like it is VIO ? wat the IP address ? etc, etc. please help. Thank you. (7 Replies)
Discussion started by: wingcross
7 Replies

4. UNIX for Dummies Questions & Answers

How to check if an application has been installed on a unix/linux box?

hi, guys, now I face a problem. I have developed an application, and when it starts, it shall check if an application has been installed on the running linux/unix. If result is positive, i do something with the application command. just as an example: I want to check if sshd has been... (3 Replies)
Discussion started by: sk1418
3 Replies

5. Red Hat

How to check if the Linux Box is available

Hi, I need to query and find out if anyone is logged into a Linux box or if the Linux Box is free available for login. This information is required to post the availability of the Linux Host for an instrument for another user to start using the instrument. Is there a command or script to query... (3 Replies)
Discussion started by: dks
3 Replies

6. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

7. UNIX for Dummies Questions & Answers

unix script to check if rsh to box and send status mail

rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh` if $rshstatus <>0 then errstatus=1 mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr else if errstatus=0 echo "status to xirsol8dr successful" can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Discussion started by: bpm12
1 Replies

8. HP-UX

How to check if DHCP is running on HP-UX box?

Hello all, Can someone help me with a command to check if DHCP is running on HP-UX box? Thanks (2 Replies)
Discussion started by: nuGuy
2 Replies

9. UNIX for Dummies Questions & Answers

How to check if DHCP is running on HP-UX box?

Hello all, Can someone help me with a command to check if DHCP is running on HP-UX box? Thanks (1 Reply)
Discussion started by: nuGuy
1 Replies

10. UNIX for Dummies Questions & Answers

Comman/Tool to check memory leak in solaris box

Hello Guys, Please let me know about commands or tools that are available to check memory leak in solaris box. Thanks in Advance (1 Reply)
Discussion started by: rajeshlbryan
1 Replies
Login or Register to Ask a Question