Newbie..Need Help Please...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
itspram
Forum Newbie
Posts: 8
Joined: Tue Sep 16, 2003 6:26 am

Newbie..Need Help Please...

Post 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..
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post 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
itspram
Forum Newbie
Posts: 8
Joined: Tue Sep 16, 2003 6:26 am

Post 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
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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
itspram
Forum Newbie
Posts: 8
Joined: Tue Sep 16, 2003 6:26 am

working fine !

Post 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
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post 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.
Post Reply