Jump to content
  • Advertisement
Sign in to follow this  
onceloving

PHP HELP

This topic is 4820 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!