Sending data to online forms - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Sending data to online forms (/showthread.php?tid=63894) Sending data to online forms by absorbation on 07-24-2006 at 11:22 AM
Now, I am creating something, something special, but I have run into a spot of bother. I want to send data from a Plus! script to a form online, which will then add data to a database. Problem is, this is something I really do not understand and I want it secure. I am confused about sending data from a script into <input> fields online. So if anyone has any basic examples or any tips to make sure it is secure it would really help . RE: Sending data to online forms by -dt- on 07-24-2006 at 11:27 AM
take a look at this RE: Sending data to online forms by Ezra on 07-24-2006 at 11:27 AM
You can't send the data to <input> fields, you have to send it to the php whatever script directly, using preferably POST. code: Something like that. Securing it, could only be done by using SSL, but you need a server that can handle SSL traffic. RE: Sending data to online forms by absorbation on 07-24-2006 at 11:40 AM Well Ezra, a real example would help a lot, just something to point to a script online and send a PostAddress variable to it. I then can work my way into things by myself . RE: Sending data to online forms by Ezra on 07-24-2006 at 11:46 AM
Well, that one kinda worked already... code: That can be retrieved with the php GET_RAW_POST_DATA function. code: This can be retrieved simply by using $_POST['name'] and $_POST['status'] EDIT: http://www.w3schools.com/ajax/ajax... Also read that, tells you about the xmlhttprequest functions RE: Sending data to online forms by RaceProUK on 07-24-2006 at 12:05 PM
quote:That snippet seems to bear more resemblance to a GET request, where vars are in the URL. RE: Sending data to online forms by absorbation on 07-24-2006 at 12:06 PM
I am having some slight trouble, what is wrong here? code: And my script code: code: I know it is sending something, as every time I change my personal message the database has a value added to it. The problem is, it is not adding the $value variable, any ideas why? RE: Sending data to online forms by Dempsey on 07-24-2006 at 12:11 PM
quote:Could it be because you have http.send ("?username=absorbation?password=password?feild=psm?value=testing"); And the script is expecting field? RE: Sending data to online forms by Ezra on 07-24-2006 at 12:13 PM
quote: Only the first variable should have a question mark the next should have an ampersand code: EDIT: searching a little about it, I don't think you need that first questionmark. code: Should do the trick RE: Sending data to online forms by absorbation on 07-24-2006 at 12:15 PM
quote: Nope, I am not currently using that variable, what I have posted is the whole of my code, apart from the $con variable. I am just trying to receive the $value variable at the moment . quote: Still not picking it up : code: And your question mark idea still does not pick up the variable. I am beginning to think it is a problem with index.php? RE: Sending data to online forms by J-Thread on 07-24-2006 at 12:51 PM Remove the first ? as Ezra already said, and it should work... RE: Sending data to online forms by absorbation on 07-24-2006 at 12:53 PM
quote: Already done, and still it does not pick up the value variable . RE: Sending data to online forms by Ezra on 07-24-2006 at 01:06 PM
I found out why it works with RAW and not with the $_POST variables. PHP doesn't know the encoding type. code: RE: Sending data to online forms by absorbation on 07-24-2006 at 01:11 PM Thanks, it finally works, thank you, thank you . RE: RE: Sending data to online forms by mickael9 on 07-24-2006 at 02:29 PM
quote: RE: Sending data to online forms by cloudhunter on 07-24-2006 at 07:08 PM
The escape(NewPsm) isn't needed at all... That isn't needed to append the value onto another command/string, and is only needed when you are gonna return a different PSM due to the value in the other PSM. RE: Sending data to online forms by deAd on 07-24-2006 at 07:12 PM I think you meant encodeURI(NewPsm)...it is a good practice to encode the variable values with this function, it helps eliminate some errors. |