kamal213 Posted September 16, 2011 Share Posted September 16, 2011 Hi guys, Was wondering if you could help. Apart from using a form are the other ways to POST to a mysql database? e.g. using clicking a link or so. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted September 16, 2011 Share Posted September 16, 2011 Yes, via AJAX. However, to make sure that your site still functions when Javascript is not enabled you should alway use a form for user input. Quote Link to comment Share on other sites More sharing options...
kamal213 Posted September 16, 2011 Author Share Posted September 16, 2011 Thanks for getting back to me. That sounds good I basically dont want a user to input anything, all they see is a link/button - one click and bang! it post to the database. Is this possible? Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted September 16, 2011 Share Posted September 16, 2011 you can use hidden inputs with jquery or AJAX.. however how would this be dynamic data? im assuming it isn't user input data.. Quote Link to comment Share on other sites More sharing options...
kamal213 Posted September 16, 2011 Author Share Posted September 16, 2011 Yeah I think your right just though about that. Well think i'll using passing variable to get the data of the customer onto the required page Think that should work? Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted September 16, 2011 Share Posted September 16, 2011 why are you opposed to using a form..? if it's not user input that you are passing, there are a number of different ways to approach this Quote Link to comment Share on other sites More sharing options...
kamal213 Posted September 16, 2011 Author Share Posted September 16, 2011 Your right! Forms might be the best solution! I was just trying to see if there ways anythang better than forms, However from your call forms seem better and safe so i'll stick to forms. Thanks for your help Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted September 16, 2011 Share Posted September 16, 2011 Your right! Forms might be the best solution! I was just trying to see if there ways anythang better than forms, However from your call forms seem better and safe so i'll stick to forms. Thanks for your help thas what forms are designed for, sending user data to either another page or the parent page to be sanitized,cleansed,stored, etc.. Quote Link to comment Share on other sites More sharing options...
kamal213 Posted September 16, 2011 Author Share Posted September 16, 2011 Another lesson learned! Thats the main reason I prefer phpfreaks to other furom! You learn alot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.