Click to See Complete Forum and Search --> : can form action post cause cross user overwrites?
buckky
12-15-2007, 07:52 PM
greetings this is my first post here, forgive me if this issue has come up before .. i dint find it. my question is this..
if i make a series of html forms generated by php that use the form action "post", is there any danger of overwites or crosstalk between simulaneous users?
im pretty new to all this and it will really screw things up for our main client if i get this wrong.thanks in advance.
ray326
12-15-2007, 11:58 PM
Yes there is but it depends on your persistence layer. If you're writing to a shared file then it's very dangerous. If you're writing to a database server then there's very little danger.
buckky
12-16-2007, 02:23 PM
thanks for the reply, i was afraid of that. i tried google the things points above and now im really lost. i dont know if im writing to shared files or if the database capacity (mysql) of our host server is involved. what i am doing in essence is this..
<html>
<body>
<FORM ACTION="file4.php" method=post>
<?php
?>
<input type=hidden name="xyz2" value="<?php echo $xyz1;?>">
</form>
</body>
</html>
and then at the end, the order information is emailed out to the vendor.
sorry but i am a total noob with both forms and php. imagine a monkey that can copy lines of code and patch it together to get a bannana. thats who you are talking to. any elaboration (or links to tutorials/info) on the above reply would be great.again thanks in advance
ray326
12-16-2007, 10:49 PM
If you have a problem it will be in file4.php, not in the form. I guess the first question would be why do you think you're having trouble?
A good noob starting point is http://www.w3schools.com/.
buckky
12-17-2007, 05:24 AM
thanks for the reply
the whole series of files uses this method to pass along data up till the final stage that emails out the order. there is a chain of about 12 pages with a few branches. "file4" (hypothetical filename) is the same as the example i gave passing data to the next page.
ive had no evidence of a problem.BUT..
being entirely new to this my concern is this - using my previous example, if two users enter info into the same page at the same time (different ip addys of course) can the vars become mixed up on the sever side? i can not afford to have such a problem after posting the form for our client.
im sorry i cant post the full "real file" but in form it is the same ( no pun intended).
in short if you see no danger of overwrites using this method as shown above then im good. i just want to be sure that the site will be relatively reliable in the end. really i dont want any f* ups to be my fault as there will be significant amounts of the end clients money at stake.
w3shools is one of the tutorial sites ive been using to make my form. thanks for the link anyway.
perhaps im seeing snakes in the grass where there arent any. i just dont know where the pitfalls in all this are so thats why im asking real web developers.
really im a graphics person that was foolish enough to say "you know its possible to use php to make this form, it would be better than action script." now all the code is my responsibility somehow and ive got to have it launched by jan 1.. ughh..
thanks for all the feedback and help.
ray326
12-17-2007, 11:25 PM
I don't think you've got a problem but it would be a good idea to get an experienced local developer to review the design and code.
buckky
12-19-2007, 09:07 PM
ya thats my plan of action now, im going to sub contract some consulting. thanks for your input. happy festivus.