#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Norway
    Posts
    103
    Rep Power
    12

    Is it possible to create a form submitting to a php file?


    I guess it is not possible, but i ask anyway:

    I want to create a form, with three fields and a submit button. the variables is submitted to a php file (action="script.php"), and the script returns a text string.

    Is this possible to make?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Switzerland
    Posts
    13
    Rep Power
    0
    For example, index.wml:

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" >
    <wml>
    <card>
    <p>
    <select name="destination_number">
    <option value="test">Here</option>
    </select>
    <input type="text" name="message" emptyok="false" maxlength="130" size="33" />
    <do type="accept" label="submit">
    <go href="process_form.php" method="post">
    <postfield name="destination_number" value="$destination_number" />
    <postfield name="message" value="$message" />
    </go>
    </do>
    </p>
    </card>
    </wml>

    you'll have $_POST["message"] and $_POST["destination_number"] available on the process_form.php script...

    Hope it gets you started...

IMN logo majestic logo threadwatch logo seochat tools logo