Php variable in several files including jquery
- by vipinsahu
i created two variable and these two variable are using everywhere . i don't want to store these variable in to database e.g
(
$username ,$password and there are 3 files using these variable load.php,index.php and add.php , i am also using jquery to load the add.php as in ajax (to add the user in JSON)
$.ajax({
type: "POST",
url: "add.php",
data: "twitter="+encodeURIComponent(twitter),
/* Sending the filled in twitter name */
success: function(msg){
/* PHP returns 1 on success, and 0 on error */
var status = parseInt(msg);
if(status)
{
$('#response').html('Thank you ');
$('#twitterName').val('');
}
else
$('#response').html('<span style="color:red">There is no user.</span>');
}
});
how can i use these two variable in a single file to perform the whole operation
Thanks