Jump to content

Print Variable if exist a costum field php-mysql


darphas

Recommended Posts

i want to print a variable if existe in a costum field on mysql database for example, the problem is that a make id query like index.php?id=1, index.php?id=2, etc.. and for example only the id=3 have a content in var.

 

php code:

$myvar="somecode or thins here"

 

mysql table:

 

name: Horse

description: Black and 4 years old

var:$myvar

 

php code:

 

 

function printvar(&$myvar)

{

if (isset($myvar)) {

echo $myvar;

}

}

 

i don't know what it happens but doesnt work :(

please help

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.