I manage to connect to the database just fine, but i got a problem getting a column.
First i ran the following sql statement to get my table.
Code: Select all
CREATE TABLE bytin(
notloggedin TEXT NOT NULL);
INSERT INTO (notloggedin) values ("My Text")
I manged to get the value using
Code: Select all
Not logged in...<br/>
<?php
$sql = "SELECT * FROM bytin";
$result = mysql_query($sql);
print($result . '<br/>');
while($line = mysql_fetch_array($result)) {
print($line['notloggedin']);
}
So no matter what, it's a bad and ugly soluion.
This gives
Code: Select all
Not logged in...
Resource id #369
My Text
bytin(
notloggedin = "My Text",
)
Beacuse then i would just need to get the value of the notlogged in key. That is what i'm trying to accaomplis here.
Hope i made some sense on what i want.