Jump to content

Search the Community

Showing results for tags '$_server[php_self]$_post'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. I'm trying to $_POST a variable or two back to the same page, so that I can scroll through different years of entries in my database... I'm not having any luck with it so far, is anyone able to tell me where I've gone wrong? I've tried a few different techniques, but my trouble boils down to being unable to post to the same page, initially I tried <a href="">'s with the variables on the end, but following documentation online its become a more complicated mess with the same effect... adding in $_SERVER['PHP_SELF'], a <form> and such... <?php $up=$_POST['up']; $dn=$_POST['down']; $year = date("Y"); if(up){$year++;} if(dn){$year--;} ?> <h2 style="font-family: ErasDemi;">Log for <?php echo $year; ?></h2> <form action=<?php echo $_SERVER['PHP_SELF'] ?> method='post'> <input type='submit' name='dn' value='Last Year'/> <input type='submit' name='up' value='Next Year'/> </form> Any help would be much appreciated.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.