I have a scenario and a much needed answer to a question
-
User Kevin visits another users profile
(view_member.php?id=)and lands on the page with the following URLview_member.php?id=57 -
The following code uses the GET method to extract the id of user 57 to index this profile page
id = $_GET['id']; -
Now I wrap my
$_GET['id']in a<div>named"show1" -
Next I want to display back the value of
$_GET['id'];from below script
Now I have script that goes like so
<script>
$(document).ready(function(){
$("button").click(function(){
Load the contents of view_member.php with #show1 <div> Problem ( "view_member.php #show1", does not have a valid ?id= to find what page kevin is on? But if I knew what page Kevin was on I wouldn't need the script
$( "#div1" ).load( "view_member.php #show1", function() {
alert( "Load was performed." );
});
});
});
</script>
How can I get the id of the user page Kevin lands because at the moment I just get and undefined index id I need my script to load the page kevin lands on and be to find the view_member.php?id=$id and display back that in a exteal file
<body>
<div id="div1"><h2>Stack Overflow Rules</h2></div>
<button>Get Exteal Content</button>
</body>


