Im trying to select the title column from a particular row
$eventid = $_GET['id'];
$field = $_GET['field'];
$result = mysql_query("SELECT $field FROM `events` WHERE `id` = '$eventid' ");
echo $result;
all i get is Resource id #19
How should i do this? What is best method?
Try this:
echo mysql_result($result, 0);
This is enough because you are only fetching one field of one row.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With