Jump to content

Simple Question About Getting Info From Database


jjacquay712

Recommended Posts

I am making a comment script for my web site, here is the code:

 

<?php

//Connect to Mysql and select Database

mysql_connect("localhost", "*****", "*****") or die("Could Not Connect To MYSQL");

mysql_select_db("euphale_comments") or die("Could Not Select Database");

 

//Define Querys

$query = "CREATE TABLE `{$_POST['name']}` (`{$_POST['email']}` VARCHAR( 255 ))";

$query2 = "INSERT INTO `{$_POST['name']}` (`{$_POST['email']}`) VALUES('`{$_POST['comment']}`' )";

 

//Make Table

if ( $_POST['hidden'] == "1" ) {

mysql_query($query) or die(mysql_error());

mysql_query($query2) or die(mysql_error());

} else {

}

 

//Say thank you

echo "Your Comment Has Been Submitted";

?>

 

basically what it does is make a table with your name you submitted, and a column with the email address you submitted, and in the row it puts in the comment. Now what i want to do is echo this data onto a page so people can view it. how would i go about doing this?

 

 

Thanks, John

Yeah, I giggled about that for a few seconds :) On the plus side, we have no freaking clue where your server is located

 

*begins building a ip-bruteforcer* Just make sure you allow remote connections and don't change the password for about 4 days :)

Yeah, I giggled about that for a few seconds :) On the plus side, we have no freaking clue where your server is located

 

*begins building a ip-bruteforcer* Just make sure you allow remote connections and don't change the password for about 4 days :)

 

ok deal

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.