Jump to content

rdwinder

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rdwinder's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Tried your entry, it says, "Updating" and posts all the information i sent to the function..
  2. I have used the same sql class a million times before on this project.. its only this instance that this issue happens.. Check these screenshots: http://www.gethosted.co.za/confusion/ Rich
  3. Hey Guys Im having some problem with my MYSQL, Here is the source code for my content <?php $db = new sql(); $id = $_GET['edit']; $db->sql_query("SELECT * FROM `content` WHERE `id` = '$id'"); $mysql_array = $db->fetch_array(); ?> <form id="form2" name="form1" method="post" onsubmit="return submitForm();" action="?content&update=<?php echo $_GET['edit']; ?>"> <p> Page name<br /> <span id="sprytextfield2"> <input name="name" type="text" value="<?php echo $mysql_array['pagename']; ?>" id="name" size="85" /> <span class="textfieldRequiredMsg">A value is required.</span></span></p> <p>Page content<br /> <script language="JavaScript" type="text/javascript"> //<!-- //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly) writeRichText('rte1', '<?php echo rteSafe($mysql_array['content']); ?>', 760, 500, true, false); //--> </script> <br /> <input type="submit" name="button2" id="button2" value="Submit" /> </p> </form> Here's the "IF" to see when to update the database. if (isset($_GET['update'])) { echo updateContent($_POST['name'], $_POST['rte1'], $_GET['update']); echo "updating"; } This is my update function function updateContent($pgname, $content, $id) { $db = new sql(); $db->sql_query("UPDATE `content` SET `pagename` = '$pgname', `content` = '$content' WHERE `id` = '$id'"); echo mysql_error(); } Now when i submit the data, the database has no record of my data, i have uploaded my code to my webserver and it seems to do it there too.. Please help me i am SO ???ed Thanks, Richard
×
×
  • 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.