Jump to content

svabhishek

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

svabhishek's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a lot for the advice .. though my problem is solved at the moment ... I'll surely remember to quote properly ..
  2. @PFMaBiSmAd Yea .. thanks a lot ... my code is up and working Many Many Many thanks for your help .. It was small but I missed that ... @WebStyles @Nodral Thanks a lott for your help guys
  3. Thanks guys ... I tried both the codes and also tried to display an error message but I dont think the files are linked properly ... there is no response from the exp_process.php file. Could you help me out with that ...
  4. Hello everyone ... I am trying out something similar too but just cant get it to work The code I have been using is as follows : * My database is FB and the table in it is profs. The field in profs is rating ** The include/connection.php file is absolutely fine and it also echo me that the connection to the database has been successful FOR exp.php <?php include 'includes/connection.php'; ?> <h2>POST</h2> <form action="exp_process.php" method="post"> <select name="rating"> <option value="1" selected="selected">1</option> <?php for($i=2; $i<=10 ; $i++) { echo '<option value="'.$i.'"> '.$i.' </option>'; } ?> </select><br> <input type="button" value="submit" /> </form> FOR exp_process.php <?php include 'includes/connection.php'; ?> <?php $rating = $_POST['rating']; $query = "INSERT INTO `profs` (`rating`) VALUES (`rating`)"; $result = mysql_query($query, $connection); if ($result) { // Success! echo " Success "; } else { // Display error message. echo "<p>Updation Failed</p>"; echo "<p>" . mysql_error() . "</p>"; } ?> I tried to put in values to buttons and tried everything but dont know why but just can't get it to work the way it should. Any kind of help would be appreciated Thank you
  5. Hello everyone ... I am trying out something similar too but just cant get it to work The code I have been using is as follows : * My database is FB and the table in it is profs. The field in profs is rating ** The include/connection.php file is absolutely fine and it also echo me that the connection to the database has been successful FOR exp.php <?php include 'includes/connection.php'; ?> <h2>POST</h2> <form action="exp_process.php" method="post"> <select name="rating"> <option value="1" selected="selected">1</option> <?php for($i=2; $i<=10 ; $i++) { echo '<option value="'.$i.'"> '.$i.' </option>'; } ?> </select><br> <input type="button" value="submit" /> </form> FOR exp_process.php <?php include 'includes/connection.php'; ?> <?php $rating = $_POST['rating']; $query = "INSERT INTO `profs` (`rating`) VALUES (`rating`)"; $result = mysql_query($query, $connection); if ($result) { // Success! echo " Success "; } else { // Display error message. echo "<p>Updation Failed</p>"; echo "<p>" . mysql_error() . "</p>"; } ?> I tried to put in values to buttons and tried everything but dont know why but just can't get it to work the way it should. Any kind of help would be appreciated Thank you
×
×
  • 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.