Page 1 of 1

Newbie..Need Help Please...

Posted: Tue Sep 16, 2003 6:26 am
by itspram
Experts all..

I am using win98+php4+apache (latest)
my following script doesnt return any variables requested from form.

<?php
if (isset($_POST['action']) && $_POST['action'] == 'submitted') {
print '<pre>';
print_r($_POST);
print '<a href="'. $_SERVER['PHP_SELF'] .'">Please try again</a>';

print '</pre>';
} else {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
Name: <input type="text" name="personal[name]"><br>
Email: <input type="text" name="personal[email]"><br>
Beer: <br>
<select multiple name="beer[]">
<option value="warthog">Warthog</option>
<option value="guinness">Guinness</option>
<option value="stuttgarter">Stuttgarter Schwabenbräu</option>
</select><br>
<input type="hidden" name="action" value="submitted">
<input type="submit" name="submit" value="submit me!">
</form>
<?php
}
?>

Please suggest me where I am wrong..

Posted: Tue Sep 16, 2003 6:39 am
by JayBird
i just tried the script and it returned the info, and i am on same stetup as you, win98, apache, php

here is what it returned

Code: Select all

Array
(
    &#1111;personal] => Array
        (
            &#1111;name] => mark
            &#1111;email] => blah
        )

    &#1111;beer] => Array
        (
            &#1111;0] => warthog
        )

    &#1111;action] => submitted
    &#1111;submit] => submit me!
)
Please try again
Mark

Posted: Tue Sep 16, 2003 7:14 am
by itspram
Hi Bech100,

everything works fine..even I am able to manipulate database.
does it requires to enable track_vars or something.

coz. at my end it returns previous page...
sorry for putting more stress..

Please suggest..

Prams

Posted: Tue Sep 16, 2003 2:40 pm
by m3rajk
you might be getting a stale page.

sounds liek it's not the wap environment nor the script, which meeans it's your browser.

make sure your browser is set to check every time, and add caching control headers in the page

working fine !

Posted: Sat Sep 20, 2003 5:28 am
by itspram
Hi buddies...

It was due to apache server.
Though its freeware and popular I have removed that and installed badblue server..very ease to use..

I suggest to use the same server....it setups everything for you just u have to code...

thanks for your co-op

Prams

Posted: Sat Sep 20, 2003 10:16 pm
by Cruzado_Mainfrm
seriously, you don't know what you are talking about, thumbs up for Apache, i'll give a mid-thumb up for IIS cuz it's kind of lame in some aspects.