Im trying to figure out a php code
[I would consider this as AJAX]
like
index.php?page=main
index.php?page=downloads
if u have ideas on mysql please write the code so i can insert it to phpmyadmin
Im trying to figure out a php code
[I would consider this as AJAX]
like
index.php?page=main
index.php?page=downloads
if u have ideas on mysql please write the code so i can insert it to phpmyadmin
Can u elaborate what exactly you want to do?
index.php contains an ajax code than when you put something in the parameter line [*.php?page=main] it gets the information from a MySQL table and prints it
when you have something like index.php?page=main, in the landing page, the value 'main' gets assigned to the variable $_GET['page']...
that is, it automatically makes the following assignment:
$_GET['page'] = 'main';
Say, if the page is index.php?page=downloads, then
$_GET['page'] would be 'downloads'...
If something has to be pulled out from a mysql table using the value of $_GET['page'], then first there has to be a table already which has many rows and one particular field may correspond to the value of $_GET['page']...
So, if you give me what type of data will be there in that field, the name of the table and name of the field and how you want to display it in the page, then I would construct a php code to query mysql and display results..
But, if you want to insert some data using phpmyadmin, then you don't have to know the query, you can just use the graphical interface of phpmyadmin to insert data....
Can you post a sample script with a simple navigation of two pages
index.php?page=main
index.php?page=downloads
Im still a beginner for PHP and learning more by questioning ang hands on
you could include a MySQL sample and the table sample if you want it secure
save the following code as index.php
Now, just type the url with anything after index.php?page=Code:<?php if(isset($_GET['page'])) { echo "<h1>" . $_GET['page']. "</h1>"; echo "This is the page for " . $_GET['page']; } ?>
You can simpy create a table in phpmyadmin and you write php codes to query mysql db according to the value of $_GET['page']
You can learn more from this link:
http://www.w3schools.com/php/php_mysql_intro.asp
Bookmarks