Added: 1 year ago
From: phpacademy
Views: 102,334
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (236)

Sign In or Sign Up now to post a comment!
  • Thanks for this excellent tutorial. You are a very talented teacher and presenter. Respect! I'm yet to try it out but very excited to get this integrated in to my website... posting forms is so 18th century ;-)

  • Can you upload a tutorial jQuery Inline-editing? I really appreciate such type of tutorial.

    Thanks

  • Alex, I just tried the sample you have in your video and I couldn't get it to work. Any ideas on why. I have the same thing you have in your code. I checked it over and over again and I can't figure out why it doesn't work

  • When the get button is pressed the text is removed from the text field and the page is reloaded.But no output is received from data.php.Please help me out.

  • hammmer tutorial. Das brauchte ich :D Vielen Dank, Super gemacht. Alles kapiert :D

  • If I become a millionaire, I am going to pay about £4,000 to Alex. :D 

  • @Rawaz1995 or more than £100,000 :D

  • good job

  • Comment removed

  • Beautiful ... thank you Alex

  • ~Thanks for the tutorial.

  • nice tutorial... one question.. what do you do if you have two fields or more in your form.. how do you transfer two or more variables to the data.php for example???

  • Excellent work, excellent way to guide... Thanks a lot

  • Great tuts!!!! keep posting!!! :)

  • Comment removed

  • Absolutely great, thanks so much!

  • is form.name.value better in any way than using document.getElementById or is it just preference?

  • wonderful lesson. I finally understood some fine details. Thank you for this fine tutorial :)

    Could you please do a tut on the php aspect of AJAX functinality (including tips for better coding?)

  • thank you for this lesson...do you know how to insert the plugins in the database?

  • Thank you very much Alex, great tutorial as always :)

  • i try the tutorial, show() can't do anything so i check website then change to text(); then it able to display, but still 1 probelm, output doesn't work, and i check website, they say , use data, but still doesn't work. :(

  • great tuts alex....

  • I really got benefit from your tutorial, but I need to know how to control the out put, if I have more than output variable affect more than one div, how could I manage this

  • Outstanding Tutorial!

    Keep up the great work. You are a real pro!

  • it doesn't work for me? is it because i'am using Navicat mysql?

  • This is not working with me. Plz make another tutorial so that i can insert data to mysql and then fetch it too.

  • Does this work in IE for anyone?

  • Simple, clear and useful. Thanks, man. It helped a lot!!

  • tks a lot man!!

  • awsome dude

  • Congratulations this tutorial is very helpful...

  • This was a simply fantastic tutorial

  • very nice I started my first code of jquery using this.. will watch other videos and see how it goes.. keep it up..

  • if using jquery, you should not be using the onClick() within the html content, jquery emphasies seperation of presentation and behaviour, better is to give the button an id and use the jquery selector to write a click event for it

  • Thanks, nice tutorial. You've just earned my sub.

  • Thanks mate. Lots of useful info. I was making my forms validation, checking if the name exists and stuff without refreshing the page, and it is chaotic! Your tutorial will help me fix it up a bit. ;( thanks again.

  • I like the way you discuss this tutorial. It is very informative. This is exactly what I am looking for. Thank you! Keep it up!

  • Hi , how can I do the same thing, but instead of clicking on the button

    I click on an image to get some text from my Database according to what I want ??

  • @Sumuwilla Make the image submit the form data upon click

  • Great video, had some trouble though about passing through the variables to the php doc, it only seemed to work when the form name was form. But again nice video :)

  • Comment removed

  • Comment removed

  • Muy buen aporte muchas gracias...

  • Please close your single tags with />!! Grr! :D

  • what if we have to POST multiple variables?

  • @aalamnaryab Use a comma, example: name: document.form.name.value, email:document.form.email.valu­e, etc....

  • @vazqjose thank you

    but i m unable to even post age

    i think i hv something wrong with jquery.js file

  • @aalamnaryab i added an email field and textbox to post too. Now that you can do that you can get back anything you want.

  • Typo.

    I got it working.

    Thank you

  • I am running IE 8. When I click the "get" button nothing happens.

    I did everthing word for word (up to time stamp 13:15 & 14:15) I downloaded the latest jquery-1.6.2.min.js from the Jquery website. I did not change its name to jquery in the script section.

  • congratulations

  • Please send the link to the code Thanks

  • crazy good! thnx!

  • ok i have a question... i built my web site from a bunch of a php incude functions.. and jquery ajax doesnt execute include file.. what should i do?

  • source code?

  • good

    

  • Excellent tutorial. I wish more of these step-by-step simple walkthroughs were available. Thanks.

  • Just what I needed, thanks a lot!

  • Hello, Great Tutorial!

    I was wondering if you know to do this:

    I have a form with some text inputs, but I also have a input type’file'

    which I’m trying to pass to data.php along with the text inputs so I can process everything there. I see that you use $.post to pass a text input, but is there a way to pass an input ‘file’and the get its values (name, size…) to validate it in data.php

    Any help will be appreciated, Thanks so much!

  • thanks you very much ;)

  • It doesnt work!!! I dont know Y!!!

  • @rohitbellary

    If you're using firefox, instead of form.name.value use document.form.name.value

  • @rohitbellary

    add document to:

    form.name.value

    so it looks like this:

    document.form.name.value

  • thank's dude!

  • This works great so long you're not pressing enter while in text field, 'cus that will make the form submit php-wise, use this code to disable it: $("form").submit(function(even­t){ event.preventDefault(); return false; });

  • @openLund where do I put the

    "$("form").submit(function(eve­n­t){ event.preventDefault(); return false; });" code at?

  • @openLund where do I put the code?

  • how are you going to create variables with the same name, and then try and teach someone else. If you created different name variables, you wouldn't have to keep saying "This `heire`, is the same as this `heire`, and it not the same as this `heire`".

  • When you enter text into the field and press enter it does not trigger the javascript function, but the text is removed from the field. Do you know how to disable that or cause either the button click or the user pressing enter on their keyboard to both trigger the javascript function?

  • @psmooth777 I suggest you to change input type="submit" to input type="button" in your form

  • @psmooth777 Try including an onKeydown Event in the submit button...and placing the get(); inside..

  • Great !!! I have no words to thank you for this, really... so clear !!!

  • Amazing stuff !!!

  • exelent tutorial.

  • for those who say it doesnt work in firefox: instead of form.name.value use document.form.name.value. this should fix it, it worked me, atleast.

  • @bandre0917 thanx a lot

  • Thanks man, I was pissed off why it wasn't working, I was looking the code over and over again and I couldn't realize what was wrong :) lol.

    Thank again. Now it works

  • @bandre0917 Thanks!

  • @bandre0917 thanks a lot :)

  • you are great.. thanks

  • i followed you, however, it is advisable to use different value names for each tag attributes which is not the same as the HTML TAG itself. Like for example FORM TAG with NAME attribute should not be named "Form" instead use "form1". So that whenever you wish to call it in jQuery function, it could easily be recognized that the one you typed in the function calls the attribute name value, not the TAG. ex : varFromTextbox: form1.name1.value in jQuery script. Still, your lesson is helpful.

  • Comment removed

  • Thanks for Pharmaceutical video. It is for me to useful.

  • This isn't working in mozilla could someone please help

  • im still stuck having jquery problems its not as simple as php sorry .....

  • Hi all, please help-) I want to get my php codes not from a different file, but from the same file, cause all my corefiles are located in that specific file

  • greate tutorial. tnx. it helped me.

  • Doesn't work in firefox =(

  • Thanks a lot!! just an advice.. It was not a problem for me, but some people may have problems with the not-so-much-difference names between variables.. as you named "database" the database.. or "name" so much times.. Anyway, I want to thank you because I found this tutorial really helpful! I'm following you!

  • //////////////

  • where can i find the source code?

  • it doesn´t work in FIREFOX i need your help

  • the code does not work in firefox plz help

  • You are the best! Thank you a LOT! :)

  • that's very informative ..

  • its not working fml

  • thanks

  • THESE VIDEOS PWN EVERYTHING ON THE WEB

    GJ PHPACADEMY

  • Waw, nice technique... I'll practice it also keep watch this channel (phpacademy) :D

    Regard from Indonesia . . .

  • Very useful .... thank you very much ... :x

  • Great tutorial but my question is how to apply the same search with same effect by clicking on enter key from the keyboard??

  • im getting nuthing when i click and i followed your instructions exactly , but im trying to process dynamic data from a database in a select menu to display another select menu with dynamic data ex. state--> city--> .... im using dynamic states and dynamic cities.. love your tuts ! please help

  • good job Alex! Can you tell me how to make it working when I m pressing the Enter key ? Because it is only working with the mouse-click. Thanks!

  • Nice tutorial. Well explained and works

  • What a TERRIFIC Tutorial!! Thanks a LOT as I found this Tut extremely useful!

  • it doesnt work when i hit enter

  • so this here, is here and its inside here, so here is output from here. Remember that this here, which is here, is here. :D

  • This is a great tutorial, and I'm certainly going to subscribe to your channel. By the way I had to rewrite your function (with the combined help of comments on here.

    I'm running Firefox Beta 4.0 and neither of the individual comments worked; however when I combined them, I got them to work; so in case anyone else is looking for the solution to the firefox problem; here's the full function re-written:

    $.post('data.php', { name: $('form[name=form] input[name=name]').val() },

    Good luck

  • @MrPampas2

    Thnks loadss

  • how to clear the result after search because i have the first name of client database display always. I have used wildcard "%$username%"

  • great work. simple and to the point.

  • Good tutorial except that you're teaching us to write wrong code. This code won't work in Firefox 4 if you're haveing a doctype declared which you absolutely should have.

    To solve the "form is undefined" problem you should type the code in the correct way:

    $.post('data.php', {name:$("#form").find("input[n­ame=name]").val()},

  • Thanks for this video man. Keep up the good work.

  • Great Tutorial ... However the code doesn't run on Firefox 4 !?? Does anyone know how to fix that !??

  • I had some problems with this in Firefox 4, apparently it tells me that the name of the form is not defined, tried to give the form an ID but still no good. tool me a while till I switched to Chrome and saw that it worked

  • I'm just curious but is it posebel to use this for a search enging with link, decription and other data?

    Greate tuu tho^^

  • @IJustPostOnYou Hey there am having same project ,i have to create a website search engine,i have to adapt lucene or solr for my university website

    is there any thing u did or u suggest me to do if u are advanced in it

  • @brahimouvic88 I'm sorry i havent tryet it yet xD

    But i can try makeing it^^

    Try send me a PM message on my channle with your email in it, if i sucseed i'll send you the source code^^

  • man! your videos are awesome! english is not my first language and I have some problems with the british accent, but your pronuntiation and your voice is so clear!

    and the way you introduce everyone to new techonlogies is just perfect!

  • Excellent tutorial!

  • great tutorial  !

  • it's the best you are Great thanks alot

  • I want to search different thing from the database at the same time.

    search with name and email for example.

    so how we can pass the other variable value using the same code

  • COOL ! LOOKING FOR MORE EXAMPLE ...

  • Nice tut, but if you post the form with enter it seems to bugger it up?

  • Wow, great video tutorial! Nice :D

  • this is great... there is a small problem (in ff3 opera chrome -- ie loads fine) form is not defined... so if you replace { name: form.name.value } with { name: $('form[name=form] input[name=name]').value } it should load just fine.

    Thx by the way :) this got me started

  • Thanks a lot! Finally I make a relationship between the jQuery,PHP and MySQL.

    This is the most clear tutorial I`ve learned.

    Greetings form ITAkademy, Serbia - Belgrade!

  • Comment removed

  • I WAS SENDING FORM VALUES WITH AJAX METHOD INSIDE JQUERY BUT THIS IS SO MUCH LESS CODE TO DO THE SAME THING....I LOVE IT!!! ;)

  • Great tutorial - easy-to-read, good pace, and nice building on concepts.

  • You need to close your input tags with a slash.

  • Which tutorial do we watch that shows how not to expose any sql to the browser? Ex. adding another layer between the client and db?

  • A very nice tutorial. I wish, though (as I know you wish also) that you would have been more careful in using "name", and "get" for the confusion of usual syntax with "post", "get", "form", "name" which makes it more difficult to understand. Figuring it out, though, can be a good way to "get it". Thanks!

  • great tutorial

  • OH NICE~~!!!.... Exactly what I am looking for!! You are a life saver!! twice!!

  • cool accent bro haha

  • hi alex... all this work nw properly... its a great thing... its dump on database empty if i dnt write anything.. will plz help to provide check before dump form validation ... plz /..tq

  • FINALLY! Some has helped me to understand this thing. Thanks man!

  • thanks ... its a nice tutorial ... i try same code .. with jQuery JavaScript Library v1.4.4 .. every thing is working nice bt except fadeIn(1000), im using IE8, will you plz advice me why?

  • Can i make a search engine this way?

  • Could you please upload Better Quality so i can see the text on Fullscreen mode ;)

    thank you :P

  • Subscribed. 

  • yup...it is very helpful..thanks Alex

  • Thank you! This Tutorial is useful.

  • thanks for the tutorial, appreciates...

  • This was probably the best use of php mysql and jquery to return db objects and the .post method I've found in much searching. This is excellent.

  • fantastic video,i've watched a few of yours, they are really good. maybe if the level becomes slightly higher then the learner will have sth more to challenge and learn more. again thanks for the effor.

  • Thank you so much for your tutorial... it helps not only me but almost all beginners in PHP... please keep posting your tutorials...

  • i dont know did everything like you and checked 4-5 times , and still not working :(

  • OMG, This was exactly what i where looking for :O

  • you are the best dear.......your tutorials are best on the net......i always found useful and everytime the code runs perfectly......thanks a tonn......

  • @sharyaroraaaa Yhea, if you write them right, not like i did xD

  • ...found this tutorial useful and was a great help for us beginners on starting up simple ajax and php scripting. thanks for this video, got more motivated on building up my personal site. :)

  • Wow! this is the best tutorial about jquery for dummies. Now I understand what is jquery and how works. Thanks!

  • Finally a simple and good tutorial of the basics! Thank you so much!

  • After spending long hours messing up with ajax forms without any success, i found your tutorial and finally solved my code problems. Thanks a lot for taking your time to upload this, Alex. Cheers.

  • @phpacademy Hey man great tutorials as always. I'm just figuring out, how can you send multiple objects from php file to the jquery file? In the php file i convert the array to a json_encode string. any tips? how i can retrieve them back in jquery?

  • Great tutorial!

  • great work!

  • There are two php files: country.php and state.php.

    Country .php has country list fetched from database and state.php has state list fetched/retrieved from state.php. Through echo "select" and echo"option" method.

    How to write a AJAX code so that when user click any country from drop down menu state drop down menu for that country populates again in drop down menu, which was previously not present. without th entire page getting refreshed...

  • Thanks Alex! My name is John and I am from Argentina, and I love watching your tutorials. Right now I am also learning Java.

    Do you intend to teach any time soon Java? It would be really nice...

  • thanks, finally I understod jquery basics :)

  • @haulas That's great. I'm glad it's helped you.

  • Respected Alex sir, You are great, I've been learning a lot from,

    one request to you that post a video on online exam and save marks in a database of ten questions only plzzzzzzzzz do me this favor.

  • One thing I noticed was that you did form.name.value. With the jQuery library, you work with objects and events. So instead of saying form.name.value, what you could have done was give your name box an id of name and said $("#name").val() which would be more jQuery friendly.

  • how about we can do this in ajax ,without refreshing the page

    Ur video is nice.

  • how about we can do this in ajax ,without refreshing the page

  • por fin aprendí algo de jquery gracias a tu video, saludos

  • NOT WORK ON FIREFOX