Jump to content

Help with turning a table fielt into a link


darkfreaks

Recommended Posts

ok now that it is linked ot conduct i want conduct.php like

 

<?php///if not logged in //// 
if($_SESSION[userlevel] != 1){
///echo
}else { echo "<table><tr><td><a href='green.gif'><img src='green.gif'></a></td><td><a href='yellow.gif'><img src='yellow.gif'></a></td><td><a href='red.gif'><img src="red.gif"></a></td></tr></table>";?>
<?php
/// array images

$image= array(green.gif,yellow.gif,red.gif);


/// if clicked on green.gif code insert it into the database 

/// if clicked on yellow.gif insert into database


/// if clicked on  red.gif insert it into the database


?>

you need to learn html we all crawl before walking.

 

add the php code you learn earlier mate.

a basic href link.

<center><a href="page.php">my link</a></center>


a basic link with a image

<center><a href="page.php"><img src="image_color.jpg" /></a></center>

lol sorry was getting ahead of myself for a moment.

 

anyway im not usre how to go about making it when you click it to insert into the database under the username in fields in the database called red yellow and green which i made int 1.

Basically i want it so if you click on red.gif it inserts into red  and same with the rest of the pictures.

 

and then i want to echo it somehow on the page echo it so it is like echo "congrats $username you have seleted The Behavior color red or whatever image they selected"; after it updates into the database.

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.