Hello every I want to pass a message from php to JavaScript function and then redirecting to another page i want to show that message . Plz help me out . here is the sample code
Php
if ($result){
$success = "New Page has been added successfully.";
} else {
$error = "Unable to process at this time.";
}
Java script
<script type="text/javascript">
window.location="admin.php?page=add_user";
</script>
i want this &success message on another page by using this javascript function . i have tried in this way
window.location="admin.php?page=add_user&<?php echo $success?> ";