With my previous profile view, it would grab the searched ID and display it using this query:
$dn = mysql_query('select firstname, lastname, age, id, background from users where id="'.$id.'"');
How ever, with my current one which is to view a event page via the searched url. So the url is socialnetwk so
$dn = mysql_query('select eventname, about, url, comment, post, msg, member_id, author_id, id from events where url="'.$id.'"');
Where the search for that one will be: http://www.socialnetwk.com/aHjrhuykLKJbBhjlHJKlkefuhoiughasoiHBOIuyhbgfDilhub/event.php?id=socialnetwk
I'm unsure how to fix this, because I've used sequel Pro and it seems I need ' ' around the url name. How ever I haven't got a clue how to include this in the query
The URL is a column, not an actual URL
Here is the code:
<?php
//We check if the users ID is defined
if(isset($_GET['id']))
{
$id = intval($_GET['id']);
//We check if the user exists
$dn = mysql_query('select eventname, about, url, comment, post, msg, member_id, author_id, id from events where url="'.$id.'"');
if(mysql_num_rows($dn)>0)
{
$dnn = mysql_fetch_array($dn);
//We display the user datas
if($dnn['id']!='')
{
}
else
{
echo 'This user dont have an avatar.';
}
?>