Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6391493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:40:42+00:00 2026-05-25T03:40:42+00:00

$test = $_GET[‘nr’]; $class = new class; echo $class->function($test); I want $test to increase

  • 0
$test = $_GET['nr'];
    $class = new class;
    echo $class->function($test);

I want $test to increase after it have fully loaded the page.

The problem is, I don’t know how. Looping $test normally will show me a lot of errors. like function cannot be declared again I’ve have the same functions names with different functionality. And it’s pretty long code.

Anyone have any idea how I can do this?
Thanks.

EDIT:

When the page is fully loaded, I want it to add + 1 to $test and then refresh it with the new variable.

I can do this manually by:

$next = $test + 1;
    echo "<a href='/index.php?nr=". $next . "'>Next page</a>";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:40:43+00:00Added an answer on May 25, 2026 at 3:40 am

    If you are storing the page in a string variable and outputting at the end you can just do a meta refresh:

    $next = $test + 1;
    echo "<meta http-equiv=\"refresh\" content=\"5; url=/index.php?nr=$next\">";
    

    …will refresh the page 5 seconds after loading completes.

    Failing that, you can do a simple javascript refresh:

    $next = $test + 1;
    echo "<script type=\"text/javascript\">\nfunction reloadPage() {\nwindow.location.href = '/index.php?nr=$next';\n}\nsetTimeout(reloadPage,5000);\n</script>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have something like this public class ViewModel { public List<Books> Test {get; set;}
I have a class with variable test in my project. I need to find
When I goto view the property page for my CSharp test application I get
I want to test ASP.NET applications to get the feel for the MVC extension
I get this error object has no attribute 'im_func' with this class Test(object): def
I have the following schema: Database: test. Table: per_login_user, Field: username (PK), password Database:
Imagine the following classes: class A { public string Test {get; set;} } class
Public class ClassB : ClassA { } public class GeneralClass { public ClassA test
Suppose I have the module test.erl, and inside it is the macro TOTAL :
I have a model (simplified for relevance) like this: public abstract class TitleCreateModel :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.