Jump to content

Recommended Posts

when i had a delete function to this i can not get the form to show up at all. i did not post the form. I would like it to do what it does now and then have a delete button to delete the ones that the user does not want. i have tried different ways. if i have just the delete and they enter their name and the date off(which needs to be added) it will work but will not show what they have

 

 

<?php 
function getmonth($m=0) {
return (($m==0 ) ? date('F') : date('F', mktime(0,0,0,$m)));
}
?>
</head>
<body>
<br>

<img src="33720001.jpg" alt="sitel" width="300" height="100" />

<?php
if(isset($_POST['action'])){$action=$_POST['action'];}else{$action="";}
if( $action == 'updated' )
{
  extract ($_POST);
  $todaysDate = date("Y-m-d",time());
  
        

//	Need to query database to see if this request is valid


echo "<p><strong>These are the dates that you have requested off!!!!</strong></p>";


$sql ="SELECT first, last, requestedDate FROM timeoff WHERE last = '$last' AND first = '$first'";
$query=mysql_query($sql) or die("Query failed : " . mysql_error());
while($row = mysql_fetch_assoc($query)) {
echo "<p>";
echo $row['first'] ." ". $row['last']. " ". " ". $row['requestedDate'];
echo "</p>";
}

$action="";
}
else
{

?>



Link to comment
https://forums.phpfreaks.com/topic/66442-something-simple/
Share on other sites

Guest
This topic is now 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.