Cannot update MySQL from php -


i cannot life of me php update database. i've gotten insert not update. been going @ on 2 hours. need pair of fresh eyes! if can figure out.. huge help. i'm making small stupid mistake, oh well. if i've left out you'd see, please let me know. it's going towards, http://cbogausch.com/portal/

update.php

    <?php     include("config/db.php");   if (isset($_post['submit'])) { $sql = "update `secure_login`.`users` set `link1` = \'$_post[input_link1]\', `link2` = \'$_post[input_link2]\', `link3` = \'$_post[input_link3]\', `link4` = \'$_post[input_link4]\', `link5` = \'$_post[input_link5]\', `link6` = \'$_post[input_link6]\', `link7` = \'$_post[input_link7]\', `link8` = \'$_post[input_link8]\', `link9` = \'$_post[input_link9]\', `link10` = \'$_post[input_link10]\', `link11` = \'$_post[input_link11]\', `link12` = \'$_post[input_link12]\', `pic1` = \'$_post[input_pic1]\', `pic2` = \'$_post[input_pic2]\', `pic3` = \'$_post[input_pic3]\', `pic4` = \'$_post[input_pic4]\', `pic5` = \'$_post[input_pic5]\', `pic6` = \'$_post[input_pic6]\', `pic7` = \'$_post[input_pic7]\', `pic8` = \'$_post[input_pic8]\', `pic9` = \'$_post[input_pic9]\', `pic10` = \'$_post[input_pic10]\', `pic11` = \'$_post[input_pic11]\', `pic12` = \'$_post[input_pic12]\', `users`.`user_id` = 1;";  mysql_query($sql);// or die mysql_error();     }     // class autoloader function, includes classes needed script     // can remove stuff if want include files manually         function autoload($class)     {         require('classes/' . $class . '.class.php');     }      // automatically loads needed classes, when needed     spl_autoload_register("autoload");       //create database connection     $db    = new database();      // start baby , give database connection     $login = new login($db);     ?>     <?php include('views/header/header.php');      ?>                     <div style="position:absolute; top:0; right:5%; background-color:#fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); width:450px; height:45px;">                             <div style="float:left; height:30px;">                                     <img src="<?php echo "http://www.gravatar.com/avatar/" . md5( strtolower( trim( $_session['user_email'] ) ) ) . "?d=mm&s=40"; ?>" style="width:30px; height:30px; border-radius:15px; border:8px solid #ccc;" />                                                             </div>                                   <div style="float:left; height:30px; margin-left:10px; line-height:30px;">                                 <div style="font-size:12px; font-weight:normal;">hey, <?php echo $_session['user_name']; ?> (<span style="font-size:12px; color:red;"><?php echo substr($_session['user_email'], 0, 15); ?>...</span>). you're logged in. <a href="settings.php">(settings!)</a> <a href="<?php echo $_server['php_self']; ?>?logout">(logout)</a>   </div>                             </div>                     </div>             </div>     <div style="position:absolute; top:60px; bottom:5%; left:5%; right:5%; background-color:#c0c0c0; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25); width:90%; height:100%; text-align:center;">         <center>         <?php echo $_post["input_link3"] ?>         <?php include('toggle.php'); ?>         </br>         </br>         <?php include('quote.php'); ?>         </br>         </br>        <form method="post" action="update.php">     <div style="background-color:white">     <table width=75%; border-color=red; style="border:2px solid black;max-width:100%; background-color:white; text-align:center;">     <tr>     <td style="border:2px solid black;max-width:100%;">         <b>link #1</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link1" size="40" size="40" value="<?php echo $_session['link1']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic1" size="40" size="40" value="<?php echo $_session['pic1']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #2</b>         </br>         link url:          <input id="input_link2" class="settings" type="text" name="input_link2" size="40" value="<?php echo $_session['link2']; ?>" />         </br>         link image:         <input id="input_pic2" class="settings" type="text" name="input_pic2" size="40" value="<?php echo $_session['pic2']; ?>" />     </td>               <td style="border:2px solid black;max-width:100%;">         <b>link #3</b>         </br>         link url:         <input id="input_link3" class="settings" type="text" name="input_link3" size="40" value="<?php echo $_session['link3']; ?>" />         </br>         link image:         <input id="input_pic3" class="settings" type="text" name="input_pic3" size="40" value="<?php echo $_session['pic3']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #4</b>         </br>         link url:         <input id="input_link4" class="settings" type="text" name="input_link4" size="40" value="<?php echo $_session['link4']; ?>" />         </br>         link image:         <input id="input_pic4" class="settings" type="text" name="input_pic4" size="40" value="<?php echo $_session['pic4']; ?>" />     </td>     </tr>      <tr>     <td style="border:2px solid black;max-width:100%;">         <b>link #5</b>         </br>         link url:         <input id="input_link5" class="settings" type="text" name="input_link5" size="40" value="<?php echo $_session['link5']; ?>" />         </br>         link image:         <input id="input_pic5" class="settings" type="text" name="input_pic5" size="40" value="<?php echo $_session['pic5']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #6</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link6" size="40" size="40" value="<?php echo $_session['link6']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic6" size="40" size="40" value="<?php echo $_session['pic6']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #7</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link7" size="40" size="40" value="<?php echo $_session['link7']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic7" size="40" size="40" value="<?php echo $_session['pic7']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #8</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link8" size="40" size="40" value="<?php echo $_session['link8']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic8" size="40" size="40" value="<?php echo $_session['pic8']; ?>" />     </td>     </tr>      <tr>     <td style="border:2px solid black;max-width:100%;">         <b>link #9</b>         </br>         link url:         <input id="input_link5" class="settings" type="text" name="input_link9" size="40" value="<?php echo $_session['link9']; ?>" />         </br>         link image:         <input id="input_pic5" class="settings" type="text" name="input_pic9" size="40" value="<?php echo $_session['pic9']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #10</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link10" size="40" size="40" value="<?php echo $_session['link10']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic10" size="40" size="40" value="<?php echo $_session['pic10']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #11</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link11" size="40" size="40" value="<?php echo $_session['link11']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic11" size="40" size="40" value="<?php echo $_session['pic11']; ?>" />     </td>     <td style="border:2px solid black;max-width:100%;">         <b>link #12</b>         </br>         link url:          <input id="input_link1" class="settings" type="text" name="input_link12" size="40" size="40" value="<?php echo $_session['link12']; ?>" />         </br>         link image:          <input id="input_pic1" class="settings" type="text" name="input_pic12" size="40" size="40" value="<?php echo $_session['pic12']; ?>" />     </td>     </tr>     <tr>     <td></td>     <td></td>     <td>         <input type="submit">     </td>     <td>         <a href="index.php">back main page</a>     </td>     </tr>     </table>     </div>     </form>     </center>     </div>      <?php include('views/footer/footer.php'); ?> 

here database connect

<?php define("db_host", "cboga*****.com"); define("db_name", "secure_login"); define("db_user", "******"); define("db_pass", "******"); ?> 

you should execute query mysql_query() , please paste less code, limiting sure problem is. understand not sure exactly, c'mon, willing doesnt mean lay back. ow , please tidy code...


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -