Jump to content

How do I get my variable out


gokeeffe16

Recommended Posts

Hello,

 

Can someone help me with the following:

 

 

From the code below I am trying to echo out ROW 10 as it contains the data I need for for my meta descriptions. As it is in a while and if statement the header file canno see it when it comes out

 

Header code

<meta name="description" content="<?php echo $description ?>"/>

 

 

How can I get the information ourt so that it is viewable by the header so it can read the $description

 

Thank you

 

 

<?php

// Connect to the database

require_once ('includes2/mysqlconnect.php');

 

// Get the kit id

$p = $_GET['uid'];

 

//Query the database

$query = "SELECT * FROM kits WHERE kit_id = '$p'";

$result = @mysql_query($query); // Run the query

 

if ($num > 0)

{ // If it ran ok , display the results

while ($row = mysql_fetch_array($result,MYSQL_NUM))

{

echo "$row[10]";

}

}

 

// Include the header file

include_once ('includes2/header.html');

 

?>

Link to comment
https://forums.phpfreaks.com/topic/141055-how-do-i-get-my-variable-out/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.