Want more? Explore the library at https://www.codecourse.com/lessons Official site https://www.codecourse.com Twitter https://twitter.com/teamcodecourse.
source
PHP Tutorials: jQuery: Get data from MySQL Database without refreshing
ajax, codecourse, css, div, divs, help, html, JQuery, mysql tutorial, php, phpacademy, refresh, refreshing, tutorial, tutorials, without
42 responses to “PHP Tutorials: jQuery: Get data from MySQL Database without refreshing”
can i get the source code?? pls
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
You really shouldn't learn from these old videos. Everything has changed a lot!
Thank you God bless!
Very good. This was helpful to me.
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";
hey,the code works for me but the div which is getting displayed on button click is disappearing quickly.So what should I do…?
I did this tutorial however, I had to change from MSQL to MSQLI as it kept showing errors. Heres what I did on the data.php to get it to work.
<?php
$db = new mysqli('localhost','',','');
if($db->connect_errno) {//echo $db->connect_error;
die('<br>Oops! we are having some problems.');
}
$name = mysqli_real_escape_string($db,$_POST['name']);
if($name==NULL)
echo "Please enter a name!";
else
{
$age = mysqli_query($db,"SELECT age FROM rates.People WHERE name='$name'");
$age_num_rows = mysqli_num_rows($age);
if($age_num_rows==0)
echo "Name does not exists!";
else
{
$rowage = mysqli_fetch_row($age);
echo "$name's age is $rowage[0]";
}
}?>
how do I mysql_connect without revealing my password in the sourcecode
This tutorial was good but the code is quiet old if you want to uses mysql_result nowadays you have to use mysqli_result instead and that requires you to create a function for it as php does not recognise is anymore
Here is the code to for the function mysqli_result
function mysqli_result($res, $row, $field=0) {
$res->data_seek($row);
$datarow = $res->fetch_array();
return $datarow[$field];
}
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?
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 <img src=''> like this not show the image
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
Thanks 🙂
Thank you for your teaching.
Thanks 🙂
XAMPP is easy to hack… don't use it!
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.
thanks a lot
best from turkey
I'm using netbeans to code this example but it's not working i do the exact same thing…
Holly fu**!!
Thx you very much,bro!!!!
Now, i can understanding this ajax request in jquery $.post….!!!!!))))
THX!!!!!
Hello from Ukraine
I have never seen incremental code dev/test done so well. I know this is simple example, but his function checks are marvelous.
i tried many a times with that coding but itz not working could u plz guide me to get the output. ASAP…
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?
LOL
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.
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.
You are probably choosing the wrong place for trying. Not many 14 years old models visiting PHP tutorials.
Life sucks. My friend has begun seeing a ten because 8 weeks ago he registered to an internet site named Master Attraction (Google it if you desire to learn more.) I'm so envious because I want to fall madly in love as well. How come it's so difficult? I'm gonna look into this Jake Ayres man's information to check out if it may help somebody like me. Crazy thing is, he once had NO success with girls. How can you change so quickly? His girl's a fucking model.
facebook.com/pages/Uniglax-Corporation/435629033157365
uniglax.com
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.
awesome
awesome, this method can be used for many stuff
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! 😀
is there any book of javascript you recommend?
Author john resig.. John Resig spread his wealth 😀
nice………..
there is some problem, what if the user does not click 'get' but direct hit enter
the results will not appear..
That is quite complicated. That is a lot of work.
noted
I too got hosting account for 1 cent thank you so much
Harriett Hollingworth