Advertisement Jump to content
Sign in to follow this  
onceloving

PHP HELP

This topic is 4970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can't seem to figure out why these functions don't work like they should work. Can someone help me?
<html>
<?php
echo $mark;
session_start();
if ($_POST["action"] == "Previous 20")
{
$mark = $mark - 20;
}
if ($_POST["action"] == "Next 20")
{
$mark = $mark + 20;
}
if ($_POST["action"])
{
?>
<script>window.location="<?php echo $PHP_SELF?>?mark=<?php echo $mark?>"</script>
<?
}
?>
<body>
<form method="post" action="<?php echo $PHP_SELF?>">
<input type=submit name="action" value="Next 20">
<input type=submit name="action" value="Previous 20">
</form></body></html>

Share this post


Link to post
Share on other sites
Advertisement
There is a webdev forum you know.

Also, a lot of the time, php doesnt like spaces in $_POST's, what exactly are you trying to do, te code is fine, but I think if we knew what you were trying to do, we could tell you a better way of going about things(also some browsers dont like script tags without you speicifying what type of script it is).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!