how to call the php code upon click of <li></li>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eros
    New Member
    • Jun 2007
    • 66

    how to call the php code upon click of <li></li>

    Code:
    <li>List
        <ul>
       	<li>List1</li>
       	<li>List2</li>
       	<li>List3</li>
        </ul>
    </li>
    How to call the php code from that html tags... when I click List1?
  • dafodil
    Contributor
    • Jul 2007
    • 389

    #2
    Originally posted by eros
    Code:
    <li>List
        <ul>
       	<li>List1</li>
       	<li>List2</li>
       	<li>List3</li>
        </ul>
    </li>
    How to call the php code from that html tags... when I click List1?
    You cannot call php code using those tags in html because there are no events associated for those tags.

    You can do this: <a href="code.php" >List1</a> This will link you to code.php when you click it.

    By the way eros means love right?

    Comment

    • eros
      New Member
      • Jun 2007
      • 66

      #3
      Originally posted by dafodil
      You cannot call php code using those tags in html because there are no events associated for those tags.

      You can do this: <a href="code.php" >List1</a> This will link you to code.php when you click it.

      By the way eros means love right?
      Yes, thank you very much.. it can call.. but how can I determine which is the clicked list (List1-List3). excluding the use of GET method.

      Yes It is... Eros means Love but there is more meaningful essence ... but still generally means "Love".. ;)

      Comment

      • dafodil
        Contributor
        • Jul 2007
        • 389

        #4
        Since you don't want to use get or post,

        You can create 3 pages for that 3 lists:

        <a href="code1.php ">list1</a>
        <a href="code2.php ">list2</a>
        <a href="code3.php ">list3</a>

        Comment

        • eros
          New Member
          • Jun 2007
          • 66

          #5
          Originally posted by dafodil
          Since you don't want to use get or post,

          You can create 3 pages for that 3 lists:

          <a href="code1.php ">list1</a>
          <a href="code2.php ">list2</a>
          <a href="code3.php ">list3</a>
          I forgot, dont want to use also different pages for this case.. POST is fine.. or by SESSIONS but i dont know how to implement...

          Comment

          • eros
            New Member
            • Jun 2007
            • 66

            #6
            For overview... I want to share to you this.. I just wanted to create a Maintenance Program via Web.. I have experience before with Windows Applications using C#... I feel difficulties on web because its totally different approaches... If possible.. I want all the codes... in Event Driven like C#.. and OOP ...then some procedural...

            If there is a tutorial or sample web apps that may help me to improve on myself... Please give me the info.. thanks a lot..

            Comment

            • dafodil
              Contributor
              • Jul 2007
              • 389

              #7
              Check this link:
              W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

              If you are going to post you need to lean a serverside programming language...
              I suggest PHP, since the codes are near to C.

              Comment

              • dafodil
                Contributor
                • Jul 2007
                • 389

                #8
                Check this link:
                W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

                If you are going to use POST you need to learn a serverside programming language to accept it....
                I suggest PHP, since the codes are near to C.

                Comment

                • eros
                  New Member
                  • Jun 2007
                  • 66

                  #9
                  how to call the php code upon click of &lt;li&gt;&l t;/li&gt; (SOLVED)

                  This topic was closed.. It is already solved.. please refer to the above conversations. using GET method

                  Thank you very much.
                  Last edited by eros; Jul 27 '07, 09:38 AM. Reason: edit title to put the word SOLVED to close this topic

                  Comment

                  • dafodil
                    Contributor
                    • Jul 2007
                    • 389

                    #10
                    Welcome. Post again if you got any problems.

                    Comment

                    Working...