jjacquay712 Posted June 6, 2008 Share Posted June 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/ Share on other sites More sharing options...
jjacquay712 Posted June 6, 2008 Author Share Posted June 6, 2008 shit.... i def put the username and pass for my db in this thred Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559484 Share on other sites More sharing options...
jjacquay712 Posted June 6, 2008 Author Share Posted June 6, 2008 im an idiot.... how do you delete it? Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559486 Share on other sites More sharing options...
discomatt Posted June 6, 2008 Share Posted June 6, 2008 Lol, get a mod to, PM barrand ( i beleive he's online right now ) Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559493 Share on other sites More sharing options...
jjacquay712 Posted June 6, 2008 Author Share Posted June 6, 2008 How ironic, my password is epic fail Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559502 Share on other sites More sharing options...
discomatt Posted June 6, 2008 Share Posted June 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559506 Share on other sites More sharing options...
jjacquay712 Posted June 6, 2008 Author Share Posted June 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/109058-simple-question-about-getting-info-from-database/#findComment-559511 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.