Jump to content


Photo

UPDATE problems


  • Please log in to reply
1 reply to this topic

#1 spikes1

spikes1
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 19 May 2006 - 09:01 AM

Well, if someone can please help me with this : I tried about everything, but, it won't work, no error message either.

First page (publication and modifying the date

<input type="hidden" name="id" value="<? echo $_POST['id']; ?>">
<input type="hidden" name="birthday" value="<? echo $_POST['birthday']; ?>">
<input type="hidden" name="phone" value="<? echo $_POST['phone']; ?>">
<input type="hidden" name="fax" value="<? echo $_POST['fax']; ?>">
<input type="hidden" name="cellularPhone" value="<? echo $_POST['cellularPhone']; ?>">
<input type="hidden" name="actif" value="<? echo $_POST['actif']; ?>">
<input type="hidden" name="approuved" value="<? echo $_POST['approuved']; ?>">

and this is my procedure :

<?
    require("session.php");
    require("connection_data.php");
    require("mysql_func.php");
    
connect();
    
    
    $sql = "UPDATE maillist SET
birthday='$_POST['birthday']',
phone='$_POST['phone']',
fax='$_POST['fax']',
cellularPhone='$_POST['cellularPhone']',
actif='$_POST['actif']',
approuved='$_POST['approuved']'
WHERE id='$_POST['id']'";
mysql_query ($sql);
    
    
    header("Location: administration.php");
?>


What am I doing wrong ?

Thanks anyway

Spikes1

#2 Honoré

Honoré
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts
  • LocationAntwerp - Belgium

Posted 19 May 2006 - 09:48 AM

try the following SQL statement:
$sql = "UPDATE maillist SET birthday='" .$_POST['birthday']. "', phone='" .$_POST['phone']. "', fax='" .$_POST['fax']. "', cellularPhone='" .$_POST['cellularPhone']. "', actif='" .$_POST['actif']. "', approuved='" .$_POST['approuved']. "' WHERE id='" .$_POST['id']. "'";





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users