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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.