Selecting variables out of a database..
Posted: Thu Mar 13, 2003 4:46 pm
Hi it's me again, unfortunatly =/
Ok, I have gotten down the whole insert into a table thing, but I can't seem to be able to print anything I get out of the table, all it tells me is "Resource id#2".
Heres what I got so far, before this there is a form..
Grr, how would I get this to work!?!
Ok, I have gotten down the whole insert into a table thing, but I can't seem to be able to print anything I get out of the table, all it tells me is "Resource id#2".
Heres what I got so far, before this there is a form..
Code: Select all
<?php
$name = $_POST["name"];
$password = $_POST["name"];
$kingname = $_POST["kingname"];
$rulername = $_POST["rulername"];
$link = mysql_connect("localhost:3306", "The Master", "")
or die("Could not connect: " . mysql_error());
mysql_select_db('wwone');
//there is already a table called info, and the first column is called rulername//
$col = mysql_query("SELECT rulername FROM info");
echo "$col";
?>