Never thought that the communication between JQuery and MySQL is THAT easy... Thanks for the example! Great tutorial.
@bdurao
14 жыл бұрын
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.
@otdrbiker
14 жыл бұрын
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.
@sdavidnowlin
13 жыл бұрын
Excellent tutorial. I wish more of these step-by-step simple walkthroughs were available. Thanks.
@JohnShirey
10 жыл бұрын
I have never seen incremental code dev/test done so well. I know this is simple example, but his function checks are marvelous.
@mattonm
12 жыл бұрын
Thanks for the tutorial Alex. This is all new to me. I have a form with a table containing several textboxes and I want to populate them when I fetch the record. Watching your video gave me the idea of filling in the cells of the table using div, instead of trying to put the record data in the textbox. I'm going to try that. Thanks again!
@HincorXXX
14 жыл бұрын
Thank you so much for your tutorial... it helps not only me but almost all beginners in PHP... please keep posting your tutorials...
@anath47
14 жыл бұрын
Thank you for making these videos. I feel like I'm a better programmer every time you post a post.
@sanetalking
11 жыл бұрын
First time I have every seen the Java Concept Like this. I could get to like this. Thank you soooooo!! much
@ufowam
12 жыл бұрын
I personally much prefer his pace rather than someone that will go slowly, explain everything everytime and bore the hell out of me :p depends on people I guess
@gerryabbott
12 жыл бұрын
Excellent tutorial. Love your how you go through the checking process as you code. Saves so much time in the long run. Learnt a lot. I'm a subscriber now. !!
@diggidan
14 жыл бұрын
Finally a simple and good tutorial of the basics! Thank you so much!
@Richard003217
13 жыл бұрын
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!
@MaxBiragnet
13 жыл бұрын
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!
@sharyaroraaaa
14 жыл бұрын
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......
@mikeyo1234
12 жыл бұрын
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 ;-)
@AkhileshTiwariit
14 жыл бұрын
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.
@joannjmaliyil
14 жыл бұрын
Heard a lot abt Jquery. Thanks for including that in a tutorial.
@capechronicler
12 жыл бұрын
This code works great as a stand alone, but I had problems with it when it is incorporated into a compliant HTML file with a DOCTYPE tag (remove the doctype and it works fine). The problem is with a section of the script $.post('check.php', { username: form.username.value }, if you replace it with $.post('check.php', { username: $(this).val() }, it works fine with a DOCTYPE tag at the beginning of the file. This makes your files compliant!
@JamesAutoDude
11 жыл бұрын
Also, you could just include JQuery using the actual URL, instead of copying all the text into a file (taking up space). But it's really just personal preference.
@empirejb
12 жыл бұрын
BRILLIANT! Tutorial was one of the best Ive found online, very well explained and easy too follow. Many thanks for your work.
@MrPampas2
13 жыл бұрын
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
@ruthwijma
13 жыл бұрын
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 :)
@Remi1115
14 жыл бұрын
Sorry for my stupid comment under here, i understand it, and it's really handy, i didn't know that you could do that. Thank you for sharing this.
@baddanmorgan
11 жыл бұрын
Thankyou so much for this vid Alex! I've been stuck on this problem for 2 days and your method works for me now, so I owe you one! :D
@Viperjts10
14 жыл бұрын
@phpacademy Ok yea, I'm still learning myself about the whole php idea, and I just wanted to make sure I wasn't too incorrect in the idea that it could be done a different way. In a way though, this vid helped me out because it gave me an exercise. Since you showed the end result at the beginning, I immediately began to see if I could do this without jquery and with what I could remember in my head, with connecting to databases and all, and I managed to do it. So I do appreciate the videos, thx
@ajakubo11
12 жыл бұрын
Sorry, my bad. The line is ok, don't use the one from my previous post. I've had some problems with my web browser cache. Everything works fine ;). Thanks a lot for this tutorial.
@Bixyo74
12 жыл бұрын
Great tutorial. What about if I would need to keep more then one value and store them into a fieldset? Examp: input type='hidden' id='id' value='id corresponding with alex's name' input type='hidden' id='age' value='age corresponding with alex's age' and so on... Thanks in advance and congratulations again for the helpful tutorial :-)
@MeMyselfAndDie
12 жыл бұрын
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?)
@Tubusy
12 жыл бұрын
Beautifully explained and demonstrated. Thanks.
@OusmaneNdiaye
12 жыл бұрын
@psmooth777 I suggest you to change input type="submit" to input type="button" in your form
@imjc
12 жыл бұрын
Simple, clear and useful. Thanks, man. It helped a lot!!
@ashoksen2003
10 жыл бұрын
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! And I expect something more complex.
@ajakubo11
12 жыл бұрын
That was great! just needed to make one adjustment: instead of: function(output) { ${#age}.html(output).show(); } I needed to do: $(document).ready(function(output){ $("#age").html(output); }) and it worked ;).
@puaflatmates
13 жыл бұрын
@rohitbellary add document to: form.name.value so it looks like this: document.form.name.value
@mrorange159
12 жыл бұрын
Great video, this has helped me a lot so far, you're a champion Alex. I have a question, if my php generates its own html form elements can this existing javascript code read those elements dynamically as the div is updated?
@MrStenW
11 жыл бұрын
That is quite complicated. That is a lot of work.
@Klootviool17
10 жыл бұрын
Maybe you can help me, i am trying to get multiple records from the database, and want to show them on different places on the site. Can you guide me in the right direction?
@89sarsar
12 жыл бұрын
thank you !!! there was a bug in my code , it didn't work cuz i named the form "name" instead of "form". so ppl check yours carefully don't give up
@eljochavz
12 жыл бұрын
thank you for this lesson...do you know how to insert the plugins in the database?
@schumibr1
13 жыл бұрын
THESE VIDEOS PWN EVERYTHING ON THE WEB GJ PHPACADEMY
@PeterWrightNZ
12 жыл бұрын
Outstanding Tutorial! Keep up the great work. You are a real pro!
@XinWongDigital
14 жыл бұрын
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.
@vidz022
13 жыл бұрын
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.
@vazqjose
13 жыл бұрын
@aalamnaryab Use a comma, example: name: document.form.name.value, email:document.form.email.value, etc....
@mwjmk
13 жыл бұрын
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?
@HelloQro
12 жыл бұрын
i think you can return an array from data.php and then do a foreach in the jquery that show every result from the array.
@flowewritharoma
13 жыл бұрын
Thanks for Pharmaceutical video. It is for me to useful.
@americancitizen748
8 жыл бұрын
If you are using the newer msqli_query then try this: $row=mysqli_fetch_array($age,MYSQLI_ASSOC); $age=$row["age"]; echo "$name's age is $age";
@finnishdevelopment3412
8 жыл бұрын
$row = mysqli_fetch_assoc($age);
@TheTedryder
11 жыл бұрын
I just love it when people don't explain why something is shitty. It's just shitty folks...Don't know why..It works...this guy just says its shitty so it must be true cause he's got 27 likes...but it works.
@IranianButterfly
12 жыл бұрын
Straightforward and simple thanks.
@shaya_sonnenberg
14 жыл бұрын
Thanckyou I was whating for a lung time for this tutorial!!!!!
@Viperjts10
14 жыл бұрын
I'm just curious to know why jquery is needed for this. I'm assuming this is just supposed to be an easy example/demonstration as to what jquery is capable of doing, but you could toss that php which you had on data.php onto the first page (index.php) and use a simple if($_POST['submit']) to decide whether or not to display some text.
@finnishdevelopment3412
8 жыл бұрын
You really shouldn't learn from these old videos. Everything has changed a lot!
@slytherin9090
12 жыл бұрын
@psmooth777 Try including an onKeydown Event in the submit button...and placing the get(); inside..
14 жыл бұрын
You're Great Alex! Your's tutors are great too! Very Great! Thanks a LOT!
@montelomanis
13 жыл бұрын
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!
@Samiakram1
12 жыл бұрын
Excellent work, excellent way to guide... Thanks a lot
@authentikitsolutions
13 жыл бұрын
FINALLY! Some has helped me to understand this thing. Thanks man!
@hsnwww
12 жыл бұрын
It was excellent tutorial, Thank you so much. what about the file main.js ?
@cherylwigand7242
11 жыл бұрын
I too got hosting account for 1 cent thank you so much Harriett Hollingworth
@messiefee
14 жыл бұрын
Men you are extraordinary tnx for this kine of tutorial, you help so mouch...
@SuperPopkung
12 жыл бұрын
thank you for better vdo for jQuery technique
@vazqjose
13 жыл бұрын
@aalamnaryab i added an email field and textbox to post too. Now that you can do that you can get back anything you want.
@newybocktor
12 жыл бұрын
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
@sSoloW
14 жыл бұрын
but I couldn't get it to work...my HTML is created using echo"HTML"; should the javascript in the HEAD tags work the same if it is being echoed out? I dont get any errors on page, simply the onClick event seems to do nothing.
@Lundburgerr
13 жыл бұрын
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(event){ event.preventDefault(); return false; });
@clickatron
13 жыл бұрын
great work. simple and to the point.
@MagicRevealer09
14 жыл бұрын
Yay! Great tut. I'm a noob at PHP, you've helped alot though.
@snupiix
13 жыл бұрын
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
@reaper1857
11 жыл бұрын
awesome, this method can be used for many stuff
@Viperjts10
14 жыл бұрын
@CrazyDancingBear Thanks for the info. It looks like after I get a good understanding with php, I'll have to move onto ajax. I REALLY have seen some incredible things done with ajax, and if I can figure out how to use that language, it would show some good knowledge.
@JonLeeSmith
13 жыл бұрын
Nice tut, but if you post the form with enter it seems to bugger it up?
@pratikbhavsar6098
8 жыл бұрын
hey,the code works for me but the div which is getting displayed on button click is disappearing quickly.So what should I do...?
@dbzssjgohan
12 жыл бұрын
Thank you very much Alex, great tutorial as always :)
@BABURAOIU
14 жыл бұрын
@machine1112 yes with a few modifications, you can.
@flightkid150
14 жыл бұрын
thanks i can use this for so many things
@PictureFilmsInMotion
9 жыл бұрын
I have a question ... how can i display the results in multiple divs Like i want some of the results to show in one div1 and other results in other div2. Thanks in advance
@YZpilot736
12 жыл бұрын
is form.name.value better in any way than using document.getElementById or is it just preference?
@scion3713
13 жыл бұрын
Thanks for this video man. Keep up the good work.
@cruzbaggio
13 жыл бұрын
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!
@yuchunc
13 жыл бұрын
OH NICE~~!!!.... Exactly what I am looking for!! You are a life saver!! twice!!
@Blue-Scorpion
13 жыл бұрын
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?
@RockstahRolln
13 жыл бұрын
What a TERRIFIC Tutorial!! Thanks a LOT as I found this Tut extremely useful!
@riotact316
14 жыл бұрын
por fin aprendí algo de jquery gracias a tu video, saludos
@iceman11a
12 жыл бұрын
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
@Remi1115
14 жыл бұрын
Nice tutorial, thank you for sharing it.
@JamesAutoDude
11 жыл бұрын
Also! You forget to close the Input fields... You do it like "input type="text" name="" />" you have to have the slash at the end! Lol.
@gaspareciviero628
12 жыл бұрын
Fantastic tutorial... Thank you very much!!!
@feverscene
14 жыл бұрын
@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?
@G4nt3ng22
9 жыл бұрын
i have question how to show the image from database ? i'll try to show it but i have problem with tag that show in result when i type the data i want search then it showed like this not show the image
@krims15
11 жыл бұрын
What if I want to process data not from data.php but from same file? In php it would be action="" (blank) instead of action="data.php". Is this possible?
@hamzarahman7763
8 жыл бұрын
if i want to use this $('#text').html(output).show(); --> data for further use what step should i follow ..like var text =$('#text').html(output).show(); thanks
@landonrivers
9 жыл бұрын
how do I mysql_connect without revealing my password in the sourcecode
@user-hd8tg4em2n
9 жыл бұрын
Landon Rivers PHP is run serverside, so everything between won't be showed.
@Itaysid
13 жыл бұрын
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
@americancitizen748
8 жыл бұрын
Very good. This was helpful to me.
@ezloves
11 жыл бұрын
thanks. This was very helpful for me.
@ChrisPBacon2010
12 жыл бұрын
I am messing around with some code and trying to make a messenger, I have all working only I need to know what the best way to loop the function to update the content instead of having to click a button every time?
@IsaacRosarioDurantecnicomp
9 жыл бұрын
How can i update the tables automatic without refreshing the page, what i want to is: Is someone insert a new record in the database in my office from another web browser i want to the new info in my browser but without refresh the page. How can i apply this tutorial to my project?
@hasan4it
13 жыл бұрын
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
Пікірлер: 222