Jump to content

How to do this function?


coder9

Recommended Posts

ok i have this simple grid table below

http://czone01.com/zodesk/paradiseclicks/tablegrid.php

 

when you click each cell number for instance.

it will store the number into variable --> $link

 

now i'm trying to create a function that will insert it into the table

which has the same column number name of the table from 1 to 100.

 

table

|cid|user_box1|user_box2|user_box3|user_box4|user_box5|user_box6|user_box7|user_box8|user_box9| and soon...

--------------------------------------------

|1  |    |    |    |    |    |    |    |    |    |

 

 

so when i click number 9 cell on the table grid for instance it should store the number 9 (which is stored in $link)

and insert the value of $link (which value 9) into column user_box9 of the table (jtablegrid).

(this is the tricky part, because $link is dynamic and it should find the right column number in the table itself)

 

here is my not finish prototype function,

function store_cell_number(){
//get value of variable link.
//determine what number.
//find the right cell number.
//assign it and insert it into the table
$link = $link;
	$query = "INSERT INTO jtablegrid (_no) VALUES ('$game_no')";
	mysql_query($query);

}

 

Please show me how to insert the dynamic value $link into its right column number that has the same number of $link.

 

THANK YOU!!! very much in advance.

 

 

Link to comment
https://forums.phpfreaks.com/topic/115562-how-to-do-this-function/
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.