Onclick save textarea content into database and display the content in another page
Tag : php , By : lietkynes
Date : March 29 2020, 07:55 AM
To fix this issue I am using Ajax to save textarea conent in database: , check this out, $("#update").click(function(e) {
e.preventDefault();
var ttle = $("#title").val();
var text = $("#prjdesc").val();
var dataString = 'param='+text+'¶m1='+ttle;
$.ajax({
type:'POST',
data:dataString,
url:'insert.php',
success:function(id) {
window.location ="path.php?id="+id; // redirects
}
});
});
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$name = $_POST['param'];
$title = $_POST['param1'];
$sql="INSERT INTO $tbl_name (title, content) VALUES ('$name','$title')";
if(mysql_query($sql)) {
echo mysql_insert_id(); // this will get your last inserted ID
} else {
echo "Cannot Insert";
}
|
Load specific html content via AJAX from a page that is loaded via ajax
Date : March 29 2020, 07:55 AM
|
how to display content from mysql database on a html page from bottom to top
Tag : html , By : Arun Thomas
Date : March 29 2020, 07:55 AM
wish of those help I was able to get what a want using Jquery .prepend() getting to load each result before each other.
|
Display proper html content in react. Content is Dynamic from Database
Date : March 29 2020, 07:55 AM
hope this fix your issue You can use dangerouslySetInnerHTML to render html content. <div dangerouslySetInnerHTML={{__html: "<p>your html content</p>"}}></div>
|
how to pass php database id from one html page to another html page using jquery mobile and ajax
Tag : jquery , By : CSCI GOIN KILL ME
Date : March 29 2020, 07:55 AM
|