How to associate submit button with only one value
I have multiple submit buttons with the same name in my ongoing table, i want to have each submit button contains only one link. So whenever i click on a button, it generates a link that the submit is associated with. How to do it?
<input type="submit" value="<? $row['bclink'] ?>" name="re_b" id="re_b">
PHP:
if (isset($_POST['re_b'])){
$xml = 开发者_如何学Csimplexml_load_file($re_b);
}
this is what i have, but it's giving me an error that "simplexml_load_file() failed to load external entity "" in .... on line 70"
my question is how to call the value of the button when is clicked?
What error? If you have a problem, then give some details, don't just say you have a problem and expect us to be able to read it from your thoughts. No one here has taken Telepathy 101.
Do you mean you want something like this?
<input type="submit" name="submit" value="Something" />
<input type="submit" name="submit" value="Else" />
if ($_POST['submit'] == 'Something') {
...
} else if ($_POST'submit'] = 'Else') {
...
}
精彩评论