![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Sorry to bother you people at CodingForums.com, but I'm having some sort of intricate problem with retrieving and inserting information into my database with my scripting.
I know, that my database works, because I run a Woltlab forum functionally and properly that retrieves and sends it's information and works totally fine. But, here is my problem. I have a few scripts that are supposed to send queries to MySQL, and retrieve the data, and in one ( which is a news script ) that inserts data. But, when I push my submit buttons, nothing is inserted into the databasing. I'll show you the scripts that I'm using. Script 1. Globals.php PHP Code:
PHP Code:
PHP Code:
Please take a moment and look these over and tell me what is being done wrong... You can E-mail me at ExistenceInfinito@Gmail.com , or leave a comment here -- either way, I'll check often. Thank you for taking the time. -Jordan. |
|
|
|
|
|
PM User | #2 |
|
teh Moderatorinator ![]() ![]() Join Date: Sep 2004
Location: USA
Posts: 2,435
Thanks: 2
Thanked 38 Times in 38 Posts
![]() |
Welcome here! It's not bothering, we are here to help.
Ok, where is $submit defined? Try changing your if statement to: if(isset($_POST['submit'])), instead of if($submit) |
|
|
|
|
|
PM User | #3 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Oh my God. Thank you, Brando. That's exactly what it needed.
I've only begun to start with PHP, and I found this script online. I hope that one day I'll be able to code this from scratch. Thank you for your time, Brando -- you're awesome. Last edited by Existence; 01-21-2005 at 07:12 AM.. Reason: Brando was spelled "Brendoe" xD!! |
|
|
|
|
|
PM User | #5 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Alright, now I have a second question -- Because this code ( from what I can read ) will display every archived file, I don't know how to only grab the top five rows from my DB. Is it like ( In the SQL of "SELECT * FROM news ORDER BY NewsID DESC" ) Do I change it from "SELECT * FROM news ORDER BY NewsID DESC FETCH TOP 5 ROWS " or something. I feel like an idiot. Haha.
If you could help me with this final thing, my script will be completed. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|