Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo questions about possible mysql and php functionalities (maybe javascript?), and where I should look to learn more
    primarykey
    data
    text
    <p>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?</p> <p>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.</p> <p>Can you guys point me to any specific tutorial/terminology/methods/programs/codes/anything? All help would be appreciated!</p> <p>EDIT: Code I have so far (just want to show to Nick) </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;tgh&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?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&lt;=$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 '&lt;table border="1" cellpadding="2" cellspacing="1"&gt;&lt;tr&gt;'; while($objResult = mysql_fetch_array($objQuery)) { if($cell % 4 == 0) { echo '&lt;/tr&gt;&lt;tr&gt;'; } if($cell == 2) { echo '&lt;td&gt;RESERVED&lt;/td&gt;'; } elseif ($cell == 3) { echo '&lt;td&gt;The other cell&lt;/td&gt;'; } else { echo '&lt;td&gt;&lt;img src="https://s3.amazonaws.com/imagetitle/' . $objResult["Picture"] . '" /&gt;' . $objResult["GalleryName"] . '&lt;/td&gt;'; } $cell++; } echo '&lt;/tr&gt;&lt;/table&gt;'; ?&gt; &lt;br&gt; view more: &lt;?php if($Prev_Page) { echo " &lt;a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'&gt;prev&lt;/a&gt; "; } { echo "|"; } if($Page!=$Num_Pages) { echo " &lt;a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'&gt;next&lt;/a&gt; "; } ?&gt; &lt;/body&gt; &lt;/html&gt; &lt;?php mysql_close($objConnect); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload