gloomer Posted June 17, 2008 Share Posted June 17, 2008 submit.php <form action="submitquote.php" method="post"> your comments:<br /> <textarea id="quote" name="quote" cols="40" rows="6"></textarea> <br /> <input type="submit" id="submit" name="submit" value="submit" /> </form> submitquote.php <?php include('dbconfig.php'); $quotes = $_POST['quotes']; mysql_query("INSERT INTO quotes (quotes) VALUES ('$quotes')"); ?> random.php <?php include('dbconfig.php'); $result = mysql_query("SELECT * FROM quotes") or die(mysql_error()); // store the record of the "example" table into $row $row = mysql_fetch_array( $result ); // Print out the contents of the entry echo "Name: ".$row['quotes']; ?> I input something in submit.php, and then go to random.php... it shows, 'Connected to Mysql (connection in dbconfig.php) Name: Why isn't it showing what I inputted into the textarea? It gets sent to submitquote.php, and is sent to the db, and then random.php is supposed to call it. I must be doing something terribly wrong. Thanks for helping out Link to comment https://forums.phpfreaks.com/topic/110527-displaying-nothing/ Share on other sites More sharing options...
Barand Posted June 17, 2008 Share Posted June 17, 2008 your textarea name is "quote", not "quotes" Link to comment https://forums.phpfreaks.com/topic/110527-displaying-nothing/#findComment-567035 Share on other sites More sharing options...
Xurion Posted June 17, 2008 Share Posted June 17, 2008 lol yeah, what Barand said. Link to comment https://forums.phpfreaks.com/topic/110527-displaying-nothing/#findComment-567345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.