Page 1 of 1
no way out with this
Posted: Mon Dec 01, 2003 8:09 am
by lisawebs
After a WEEK I can't make a simple/single record write/read,
I place example and code at:
http://www.usa21.net/lisawebs_demo.php
there's also a link for the whole PHP code.
Please "for mercy!!!" someone take a look!
Posted: Mon Dec 01, 2003 9:49 am
by patrikG
Just a quick note: take the database-details out of the text-file you display unless you want someone to mess it up.
Posted: Mon Dec 01, 2003 10:00 am
by microthick
lisa, your code is really nice looking though. i'm sure the error is small.
i've never seen someone handle inserts and updates with the syntax you do.
Posted: Mon Dec 01, 2003 11:32 am
by Pyrite
Holy Shananagins!
Where did you learn to code?
I've never seen anyone write php like this ...
Like using trinary operators in QBasic ..
I think I'm going to adapt your style, I like it. My foo is weak ..
Don't suppose your message popup javascript could be wrong, I mean you did check it in the database right? I assume you would, just making sure.
other than that, i gotta study this a bit more, lol

Posted: Mon Dec 01, 2003 11:45 am
by Pyrite
Ok, just checking here.. but..
Code: Select all
if (isset($_POSTї'opcode'])) {
$opcode = $_POSTї'opcode'];
if ($opcode > 6){
$flag = 1;
} }
May be try taking that $opcode = $_POST thing out of the if. for some reason, php never lets me at least access the $_POST and $_GET vars in functions, I always have to assign them to variables first and then test those.
Also: do you realize you are passing a php variable (opcode) to the script with a hidden value of 0 ? Is that supposed to be right?
Still trying to figure this out. Your code is easy to read but hard to understand, lol.
Posted: Mon Dec 01, 2003 11:47 am
by microthick
lisa, ive never used the REPLACE sql command before, but it sounds like your table must have a primary key for it to work properly.
i know you do have an auto increment field, but when you created the table, did you make that field also the primary key?
Posted: Mon Dec 01, 2003 11:56 am
by Pyrite
Have you ran your SQL queries on your database to see if they are right?