Results 1 to 2 of 2
  1. #1
    furmonk's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    159
    Reputation
    27
    Thanks
    54
    My Mood
    Daring

    php text box variables

    I dont understand why this happens, I followed multiple tutorials and still
    this error happens

    Code:
    <?php
    if(isset($_GET['ex']))
    {
    		$ex = $_GET['ex'];
    }		
    ?>
    
    <form action="" method="POST">
    text: <input type="text" name="ex">
    <input type="submit" name="submit" value="submit">
    </form>
    <?php
    echo $ex
    ?>
    How do I get the variable to work
    Last edited by furmonk; 07-18-2011 at 10:55 PM.




  2. #2
    KushxOrangeJuice's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Crossfire/CombatArms/MPGH Story
    Posts
    428
    Reputation
    4
    Thanks
    321
    My Mood
    Bashful
    <?php>
    if(isset($_GET['ex']))
    {
    $ex = $_GET['ex'];
    }
    ?>

    <form action="" method="POST">
    text: <input type="text" name="ex">
    <input type="submit" name="submit" value="submit">
    </form>
    <?php
    echo $ex
    ?>
    echo $ex

    Thats your problem that code isnt finished. Either finish it or remove it.

    Yeah i tested it the $ex is a unnecessary code and it messes up the whole script. Just take it off thats how i fixed it.

    Awhhhh i see why its not working



    <?php
    if(isset($_GET['ex']))
    {
    $ex = $_GET['ex'];
    }
    ?>

    <form action="" method="POST">
    text: <input type="text" name="ex">
    <input type="submit" name="submit" value="submit">
    </form>
    ---------------
    <?php
    echo $ex
    ?>
    ---------------
    You need to fix that spot to this

    echo $ex
    <?php>

    and at the top you made it <?php

    Gotta make it <?php> you just made simple mistakes you didnt notice.
    Last edited by KushxOrangeJuice; 07-26-2011 at 09:14 AM.

    MPGH MapleStory Private Server Information Check it out!!


    Currently Learning PHP And C++
    PHP: [||||||||||]
    C++: [||||||||||]

    Read the Thread before you post.
    Need help, ask or pm me.
    Press the thanks button, dont say it.

    [IMG]https://i1210.photobucke*****m/albums/cc417/shmorgoo/forlol.png[/IMG]
    Forum Rules and Etiquette.

    .:Guides&Tools:.
    MSVCR100.dll Error, Menu not showing up? READ THIS GUIDE.
    Need a simple working undetected injector? Click Here


Similar Threads

  1. [Info]Text Box Class
    By NOOBJr in forum Combat Arms Coding Help & Discussion
    Replies: 23
    Last Post: 01-19-2011, 01:21 PM
  2. Login Screen text box problems
    By xArms in forum CrossFire Help
    Replies: 2
    Last Post: 10-11-2010, 06:51 AM
  3. Need help saving info in text boxes please
    By bayley60 in forum Visual Basic Programming
    Replies: 10
    Last Post: 07-09-2010, 10:02 AM
  4. [Help]Print Text Box [Solved]
    By zmansquared in forum Visual Basic Programming
    Replies: 7
    Last Post: 03-10-2010, 06:56 PM
  5. [Help]Basic Text Box[Solved]
    By FlashDrive in forum Visual Basic Programming
    Replies: 3
    Last Post: 03-06-2010, 10:54 PM