nochlux
-
Posts
5 -
Joined
-
Last visited
Posts posted by nochlux
-
-
the script works, but I wanted to simplify the code if possible!
<div id="bottom">
<img src="test.png" id="test" usemap="#testmap" width="0" height="0" border="0" style="position: relative; top:-0px; visibility: hidden;"><img src="test.png" id="test2" usemap="#testmap" width="0" height="0" border="0" style="position: relative; top:-0px; visibility: hidden;">
<map name="test"><form method="post" target ="top><area shape="rect" coords="1,1,1,1" onmouseover="display(1);" href="test.php?id=0000"></map>
<map name="test2"><form method="post" target ="top><area shape="rect" coords="1,1,1,1" onmouseover="display(1);" href="test.php?id=0000"></map>
</form>
</div>
now on my php pg,
i have this
if(!empty($_GET['id']))
{
$id=$_GET['id']
}
if I write this script and run, it works when I use get, but it will not when I replace it POST.
How can i fix the html page, for div, form, and map?
Thank you
-
out of notepad++, komodo, and aptana, what do you recommend/prefer?
-
Suppose on my html page i have this code:
<map name="example"><form method="post"><area shape="" coords="" href="ex.php?id=0000" ></form></map>now on my php pg,if(!empty($_GET['id'])){$id = $_GET['id'];}if i write this script and run, it works, but if I replace to POST instead of GET, the page will not work, becomes a blank pg.Anyone knowing what i'm doing wrong? -
Suppose I have this code
$num = $_SESSION['count'];
$_SESSION['a'][$num] = $a_letter;
$_SESSION['b'][$num] = $b_letter;
$_SESSION['c'][$num] = $c_letter;
$_SESSION['d'][$num] = $d_letter;
$_SESSION['e'][$num] = $e_letter;
$_SESSION['f'][$num] = $f_letter;
if(!exists) {
$num = $_SESSION['count'];
$_SESSION['a'][$num] = $a_letter;
$_SESSION['b'][$num] = $b_letter;
$_SESSION['c'][$num] = $c_letter;
$_SESSION['d'][$num] = $d_letter;
$_SESSION['e'][$num] = $e_letter;
$_SESSION['f'][$num] = $f_letter;
}
else {
$num = $_SESSION['count'];
$_SESSION['a'][$num] = $a_letter;
$_SESSION['b'][$num] = $b_letter;
$_SESSION['c'][$num] = $c_letter;
$_SESSION['d'][$num] = $d_letter;
$_SESSION['e'][$num] = $e_letter;
$_SESSION['f'][$num] = $f_letter;
}
Now I don't want those codes to copy paste repetitively, but instead I want to come up with a function - So I probably have to create a function in php then??
function list ()
{
$num = $_SESSION['count'];
$_SESSION['a'][$num] = $a_letter;
$_SESSION['b'][$num] = $b_letter;
$_SESSION['c'][$num] = $c_letter;
$_SESSION['d'][$num] = $d_letter;
$_SESSION['e'][$num] = $e_letter;
$_SESSION['f'][$num] = $f_letter;
}
$value = function list();
if (!exists)
{
$value
}
else {
$value
}
How does this work please?
help me organizing the script
in PHP Coding Help
Posted
my question was why POST doesn't work while it should work since I put the POST for form method
As you can see, it is written as GET, and its actually working, thats why I am asking why this problem is happening