I am having issues getting a page to reload after I submit data to a database. This form should input data to a DB and then I want it to reload and list what is in database. I have gotten it to reload and list the data but it always lists everything through to the second to last entry. The most current entry does not get listed. I must refresh the page to get it to list.
main form
Code: [Select]<?php
include 'refresh.php'; //should refresh the page
include 'dbc.php'; //database connection
include 'list_categories.php'; //lists all the categories from the database
echo "<br />";
?>
<form name="form1" method="post" action="add_category.php">
Add Category : <input name="category" type="text" id="category"><input type="submit" name="submit" value="Submit"></p>
</form>
<form name="form2" method="post" action="delete_category.php">
Delete: <?php include 'get_categories.php'; ?><input type="submit" name="submit" value="Submit">
</form>
<a href="http://budget.themarkhart.com/delete_all_categories.php">Delete All</a>
<a href="menu.php">Menu</a>
refresh.php
Code: [Select]<?php
$page = $_SERVER['PHP_SELF'];
header("Refresh: url=$page");
?>
list.php
Code: [Select]<?php
include 'dbc.php';
$result = mysql_query("SELECT * FROM categories order by category ASC");
while($row = mysql_fetch_array($result))
{
echo $row['category'];
echo "<br />";
}
?>
Wierd echo error?
Hi, i got the most wierd php error ever and i don't know why..Code: echo "<td><strong>MP:</strong></td>"; echo
MySQL-PHP Query Results Help
Hello all. I'm hoping to be able to get some help in solving a problem with query/rowcount output. I've been learning PHP and mySQL for about 7 months now and have several successful Mods
Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but when i Created PO with ME21N the info record is OK
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to put the CRON code do I put it in the header between the head tags? do I put it before any html code?
Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 scale. I had someone make a Top Rated section for the site, to show the user with the highest rating
Calling variables
I want to call this to my website but it doesn't display what I want it to,Code: <h5>Edit Subject: <?php echo $sel_subject['menu_name']; ?></h5>If I change
Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.
do while conditions
i want to display 6 images in a 2x3 tablenow what would be the correct logic tocount that there are 6 images resultsand if there are more than 6 images loop and echo the rest but not in the tablebut
Get relative path from absolute path
How would one go about getting the relative path to a file from its absolute path?
Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount of tickets and then enters their personal details... then this form does the post method and it then