name, value, instead of url in html and php

Status
Not open for further replies.

gohand

In Runtime
Messages
151
I am new to php, and this think blocks my way: how can I replace a url that set for (e.* <a href=...>...) with a name and a value (like html form <input type="select", option... name="var" value="1") or any other way so I can set a specific name to a few link bar and a different value to them, so i can use if-else conditional to determine which link did the user select, note that because i am using image objects like navigation bar etc.
 
is your problem like, the user select a link, then the information about which link was selected is posted to a php page? what's the purpose of determining which link did the user select?
 
it's like..... you can look at this example test code that i am trying to do
.... <body>


1 2 3
<?php
//addressing error:
ini_set ('display_errors',1);
error_reporting (E_ALL & ~E_NOTICE);


$select=$_GET['select'];

if (empty ($select)){
$body=include "hello.php";
}else{
$body=include "example.php";
}
?>
</p>
<table width="100%" border="1" cellpadding="2" cellspacing="2" bordercolor="#000000">
<tr>
<td bordercolor="#000000"><?php print /*try print out this var, but can't*/"$body"; ?></td>
</tr>
</table> ....

though, it's completely wrong in the syntax, i've tried many times, due to i just learn a little php for few days, i am trying to use the $_GET method trick to do it, but now the hardship is: how can i print a variable within a tables?
 
Status
Not open for further replies.
Back
Top Bottom