April 5, 200818 yr Hey all, Im having trouble with my PHP script... it will add the news via the button perfectly (just what i wanted ) but unfrotunately whenever i refresh the page after it will add the same thing over and over again until i type something new and add it... (then it will add that over and over etc...) can anyone please help? (im a complete noobie at this stuff ) Files: also how can i limit it to have a certain amount on the <div> that is used for news? atm it will just keep going and going extending the page off the <div> it should use... style1.css PHP_project.php
April 7, 200818 yr Hi, Looking at your code, I can see two things that jump out at me - and they are related. You have written the form method as 'POST' - but you are checking for some of the variables (if isset) as GET. Secondly, your connecting to the database in the 'else' section of the script. Should this be at the top? Your script seems unnecessarily complex. How do you delete the news? Paul.
Create an account or sign in to comment