bakigkgz Posted January 12, 2009 Share Posted January 12, 2009 hello my friends i can not control checkbox can you help me please my html and php code belov i want to send checbox stuation and textbox value save_rent.php page but i can not please help me thanks the my indexyz.html code <html> <body bgcolor="Teal"/> <center><h1>ALL CD/DVD FOR RENT</h1></center> <img src="film/islm2.JPG"/> <input type="checkbox" name="cd1"><b> amount....:<input type="text" name="cd1amount"/> <br> <form action="save_rent.php" method="POST"> <br><center><input type="submit" name="rent" value="payment all checked"> <input type="submit" name="return" value="return main page"></center> </form> </body> </html> ************* my save_rent.php page code: <?php session_start(); include('configproject.php'); if ($_POST['rent']) { $checkbox1=$_POST['cd1']; if ($checkbox1==true){ echo "ok"; } } ?> Link to comment https://forums.phpfreaks.com/topic/140445-i-can-not-cont-rol-and-can-not-send-checkbox-stuation/ Share on other sites More sharing options...
chronister Posted January 12, 2009 Share Posted January 12, 2009 <input type="checkbox" name="cd1"><b> amount....:<input type="text" name="cd1amount"/> These are outside the form tags... Try this... <html> <body bgcolor="Teal"/> <form action="save_rent.php" method="POST"> <center><h1>ALL CD/DVD FOR RENT</h1></center> <img src="film/islm2.JPG"/> <input type="checkbox" name="cd1"><b> amount....:<input type="text" name="cd1amount"/> <br> <br><center><input type="submit" name="rent" value="payment all checked"> <input type="submit" name="return" value="return main page"></center> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/140445-i-can-not-cont-rol-and-can-not-send-checkbox-stuation/#findComment-735066 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.