Jump to content

Game Playing System


davidknag

Recommended Posts

weird stuff maybe add the following line:

<?php
$con = mysqli_connect('localhost', 'webuser', 'davidknag', 'games')or die(mysqli_error($con));

if(isset($_GET['id'])){
     $query_var = (int)$_GET['id']; // force it to be an integer

$query=" SELECT * FROM games WHERE id = '$query_var'";

     $result = mysqli_query($con, $query)or die(mysqli_error($con));
     while($row =  mysqli_fetch_array($result)) { //this output should be filtered in a real world
         $string1= '<td><h2 class="blye2"><i>'.$row['title'].'</i></h2><br />';
         $string2= 'dd'.$row['swfname'].'<br />';
         $string3= 'Description: '.$row['description'].'<br/>';


$string4= 'How To: '.$row['howto'].'</h3>';
     $mysupertitle = $row['title'];// <----------------------------------------------I added this line
     }
}

?>

and than in between <title></title>

place

<?php echo $mysupertitle; ?>

 

make sure the first part is in the head or ontop of your page since it read from top to bottom.

Link to comment
Share on other sites

weird stuff maybe add the following line:

<?php
$con = mysqli_connect('localhost', 'webuser', 'davidknag', 'games')or die(mysqli_error($con));

if(isset($_GET['id'])){
     $query_var = (int)$_GET['id']; // force it to be an integer

$query=" SELECT * FROM games WHERE id = '$query_var'";

     $result = mysqli_query($con, $query)or die(mysqli_error($con));
     while($row =  mysqli_fetch_array($result)) { //this output should be filtered in a real world
         $string1= '<td><h2 class="blye2"><i>'.$row['title'].'</i></h2><br />';
         $string2= 'dd'.$row['swfname'].'<br />';
         $string3= 'Description: '.$row['description'].'<br/>';


$string4= 'How To: '.$row['howto'].'</h3>';
     $mysupertitle = $row['title'];// <----------------------------------------------I added this line
     }
}

?>

and than in between <title></title>

place

<?php echo $mysupertitle; ?>

 

make sure the first part is in the head or ontop of your page since it read from top to bottom.

yep of course :P

 

thanks man ;)

worked like a charm

ty for all your help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.