Jump to content

i can not cont rol and can not send checkbox stuation


bakigkgz

Recommended Posts

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";

}

 

}

?>

<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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.