Jump to content

nochlux

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by nochlux

  1. 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

     

     

     

     

  2. 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?
     
     

     

     

     

  3. 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?

×
×
  • 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.