Jump to content

Popup Confirmation box. HELP! :(


jushiro

Recommended Posts

I've got here a code.. So basically this code is for deleting..

i want to set a Confimation popup box With yes or no.. then' When the user click yes, it will redirect to the next page.

and if its a no. it would be at the same page.

 

Here's my code.

 

<form name="formnew" method="post" action="valdelsec.php">
<?php
$host="localhost"; 
$username="root"; 
$password="";
$db_name="dbsection";
$tbl_name="sections"; 

mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);

$count=mysql_num_rows($result);


    echo '<select style="position:absolute; top:307px; left:302px; width: 254px; height: 21px; font-size:10px;" name="section" onChange="this.name">'; 
    echo "<option size =30 selected>Select</option>";
    if(mysql_num_rows($result)) 
    { 
    while($row = mysql_fetch_assoc($result)) 
    { 
    echo "<option>" .$row['Sname']. "</option>"; 
    } 
  echo "</select>";
    } 
    else {
    echo "<option>No Section Present</option></select>";  
    } 
    ?>
<div id="apDiv11"><input type="image" src="images/delete.png" name="Image9" width="170" height="35" border="0" ></div>
</form>

..

 

Hoping for your help.. thx!

Link to comment
https://forums.phpfreaks.com/topic/249369-popup-confirmation-box-help/
Share on other sites

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.