The issue is resolved by 50%. With the transfer of $ _SESSION [id] sorted out, help transfer the user data $myrow[id];
to the handler (PS: data is extracted at the entrance to the page for each user separately !!)
Here is the script itself. Tell me how to make so that the values of $_SESSION[id]
transferred to it ?!
<form id="tweetForm" action="submit.php" method="post"> <textarea name="inputField" id="inputField" tabindex="1" rows="2" cols="40" ></textarea> <input class="submitButton inact" style="margin-right:20px;" name="submit" type="submit" value="update" disabled="disabled" /> </form> $.ajax({ type: "POST", url: "submit.php", data: submitData, dataType: "html", success: function(msg){ if(parseInt(msg)!=0) { $('ul.statuses li:first-child').before(msg); $("ul.statuses:empty").append(msg); $('#lastTweet').html($('#inputField').val()); $('#inputField').val(''); recount(); } } });
And here's the submit
file:
require "db.php"; if(ini_get('magic_quotes_gpc')) $_POST['inputField']=stripslashes($_POST['inputField']); if(mb_strlen($_POST['inputField']) < 1 || mb_strlen($_POST['inputField'])>91140) die("0"); mysql_query("INSERT INTO demo SET tw='".$_POST['inputField']."',dt=NOW(),sender='".$_SESSION['id']."',wallid='".$myrow['id']."'"); echo formatTw($_POST['inputField'],time());
Tell me why the session data and data pages are not recorded in mysql? What needs to be fixed for the code to work? Thank you in advance!