| | |
How to use HTML tags in PHP
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2007
Posts: 11
Reputation:
Solved Threads: 0
I am tring to use HTML tags checkbox and textbox along with PHP.
When the checkbox is not checked,the textbox is disable.But when I checked the check box,the textbox should become enabled.
How can i do this?
Here is My code:-
Please help me as soon as possible.
When the checkbox is not checked,the textbox is disable.But when I checked the check box,the textbox should become enabled.
How can i do this?
Here is My code:-
html Syntax (Toggle Plain Text)
<html> <head> THIS IS TEST <title> TEST </title> </head> <form> <body> CHECK BOX <input type="checkbox" name="htmlchk" value="chk"id="chk"><br> TEXT BOX <input type="text" id="txt"disabled="True"> <?php if($chk.CHECKED=="true") { $txt.disable="False" } ?> </body> </form> </html>
Please help me as soon as possible.
Last edited by stymiee; Feb 5th, 2007 at 10:58 am. Reason: removed bold tags
This is something you will want to do with JavaScript.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Mar 2004
Posts: 763
Reputation:
Solved Threads: 38
html Syntax (Toggle Plain Text)
<html> <head> <script language="javascript"> function checkState() { document.testform.tf1.disabled = !document.testform.tf1.disabled; } </script> </head> <body> <form name="testform"> <input name="cb1" value="test" type="checkbox" onClick="checkState()"> <input name="tf1" value="test2" type="textfield" disabled="true"> </form> </body> </html>
![]() |
Similar Threads
- Sending HTML email via PHP mail function (PHP)
- Accessing HTML checkboxes with php and javascript (PHP)
- Using HTML tags in PHP code (PHP)
- storing details as html doc using php (PHP)
Other Threads in the PHP Forum
- Previous Thread: Issue with \' within content
- Next Thread: PHP Sendmail Tutorial
| Thread Tools | Search this Thread |
apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date display dynamic echo email error fcc file files folder form forms freelancing function functions google href htaccess html image include incode insert integration ip javascript joomla limit link login mail match menu method mlm mod_rewrite multiple mysql oop pageing pagerank paypal pdf php problem query radio random recursion recursiveloop remote script search server sessions sms smtp soap source space sql strip_tags subversion support! survey syntax system table template tutorial undefined update upload url validator variable video virus web window.onbeforeunload=closeme; youtube






