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 4087790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:53:58+00:00 2026-05-20T18:53:58+00:00

First, is it possible for when I insert a record onto my mysql table,

  • 0

First, is it possible for when I insert a record onto my mysql table, a page is automatically generated using the new record in some way. EXAMPLE: My column “image” is on autoincrement, so my image names are always numbers. Furthermore, is it possible for when I insert a record, I automatically generate a page with my image name. So basically, I submit record 367, the image name is 367, and my site will automatically generate mysite.com/367? I want to go in more details but you get the point. Is it possible? If not, what’s the closest thing possible?

Also, is there someway to automatically update my page periodically. Such as I set it so at 5pm, it’ll automatically insert a code. 5:30pm, it’ll insert a different code, which I preprogrammed to do. This is useful, for say I’m on vacation but I still want to update my site regularly.

Can you guys point me to any specific tutorial/terminology/methods/programs/codes/anything? All help would be appreciated!

EDIT: Code I have so far (just want to show to Nick)

<html>
<head>
<title>tgh</title>
</head>
<body>
    <?php
        $objConnect = mysql_connect("localhost","root","") or die(mysql_error());
        $objDB = mysql_select_db("thegoodhumor");
        $strSQL = "SELECT * FROM gallery";
        if (!isset($_GET['Page']))  $_GET['Page']='0';
        $objQuery = mysql_query($strSQL);
        $Num_Rows = mysql_num_rows($objQuery);

        $Per_Page = 16;   // Per Page

        $Page = $_GET["Page"];
        if(!$_GET["Page"])
        {
            $Page=1;
        }

        $Prev_Page = $Page-1;
        $Next_Page = $Page+1;

        $Page_Start = (($Per_Page*$Page)-$Per_Page);
        if($Num_Rows<=$Per_Page)
        {
            $Num_Pages =1;
        }
        else if(($Num_Rows % $Per_Page)==0)
        {
            $Num_Pages =($Num_Rows/$Per_Page) ;
        }
        else
        {
            $Num_Pages =($Num_Rows/$Per_Page)+1;
            $Num_Pages = (int)$Num_Pages;
        }

        $strSQL .=" order  by GalleryID ASC LIMIT $Page_Start , $Per_Page";
        $objQuery  = mysql_query($strSQL);
$cell = 0;
echo '<table border="1" cellpadding="2" cellspacing="1"><tr>';
while($objResult = mysql_fetch_array($objQuery))
{
  if($cell % 4 == 0) {
    echo '</tr><tr>';
  }

if($cell == 2) {
    echo '<td>RESERVED</td>';
} elseif ($cell == 3) {
    echo '<td>The other cell</td>';
} else {
    echo '<td><img src="https://s3.amazonaws.com/imagetitle/' . $objResult["Picture"] . '" />' .
    $objResult["GalleryName"] . '</td>'; }
    $cell++;
}
echo '</tr></table>';
    ?>

        <br>
view more:
<?php
        if($Prev_Page)
        {
            echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'>prev</a> ";
        }
            {
                echo "|";
        }
        if($Page!=$Num_Pages)
        {
            echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>next</a> ";
        }
        ?>
</body>
</html>
<?php
mysql_close($objConnect);
?>
  • 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-20T18:53:58+00:00Added an answer on May 20, 2026 at 6:53 pm

    It sounds like you want a dynamic web page. To make a dymaic webpage I’d suggest using PHP which would interact with the mysql server.

    For example, a user would visit ‘mysite.com/info.php?image=367’ and the php script would get the information ‘image=367’. Your PHP script could do a select query against the mysql database ‘SELECT paragraph FROM table WHERE image_id = 367’ and then write that data out to the user’s web browser.

    As far as the user is concerned they just visited ‘mysite.com/info.php?image=367’, but in the background, PHP dynamically created the webpage content after it got that request.

    More basic info about dynamic webpages: http://way.clicktracks.com/help/en/pr650/index.html?dynamicwebsiteshowtheywork.htm

    Simple Intro to PHP:
    http://www.tizag.com/phpT/

    http://www.w3schools.com/php/php_intro.asp

    Here is a head start I wrote for you, feel free to use it.

    <?php
    
      if (!isset($_GET['imageNumber'])) 
        die("You must specify an image number");
    
      $image_requested = mysql_real_escape_string($_GET['imageNumber']);  //sanitizes input
    
      $dbhost = 'localhost';    //TODO: Set this to the ip address of your mysql server if it is not on the same machine
      $dbuser = 'root';     //TODO: Set the username you use to access your mysql db here
      $dbpass = 'password';     //TODO: Set the password you use to access your mysql db here
    
      $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
    
      $dbname = 'database_name_here';  //TODO: Set the database name here 
      mysql_select_db($dbname);
    
      $query = "SELECT paragraph FROM table_name WHERE image_id = " . $image_requested; //TODO: Set table_name, column to get, and image_id to the correct column name
    
      $result = mysql_query($query);
    
      $row = mysql_fetch_array($result) or die(mysql_error());
    
      echo "Here is the paragraph of text" . $row['paragraph'];  //TODO: Set paragraph to the same column you retrieved 3 lines above.
    
      mysql_close($conn);
    
    ?>
    

    As for the second part of your question, it can also be done with PHP

    <?php
    
    $specifictime = strtotime("tuesday 3pm");
    if (time("now") > $specifictime)
    {
     echo " its after 3pm on tuesday"; 
    }
    else { 
     echo " not 3pm on tuesday yet"; 
    }
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get the value from the first page to the second
First, let's get the security considerations out of the way. I'm using simple authentication
I am trying to insert 2 rows into the same table. The first will
First off, I am using Windows XP. I have multiple hard drives and it
First off: I'm using a rather obscure implementation of javascript embedded as a scripting
First off, I'm working on an app that's written such that some of your
When using insert-kbd-macro to save a named keyboard macro I get unreadable Lisp code
I have the same problem as described in ( Last record of Join table
I am looking for a way to only insert when the row does not
I am attempting to pull some information from my tnsnames file using regex. I

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.