javascript - How to extract the value passed in through onclick function event? -
I have an The php bit looks like this: How can I pass this Do you have to pass a news ID using the query string as the URL? NewsId = 104 format. On the php side, you can use Note: How many values to pass in the query string here: Reference: onclick = "ShowSingleNew (299)" event for this one link Opens a new popup, what I would like to do is to remove
299 (which is an id of the given new item) and pass it to my PHP script so that the item belongs to that user Read
if (empty ($ _GET ['news_id'])) Select {SKL ..} and select {SLL} where News_id == $ _GET ['news_id']; }
ShowSingleNew ID on the next page and give it in the $ _GET variable?
The sample code looks like this in the original format:
ShowSingleNew (newsId) {var url = "Your URL goes here"; Window.open (url + "? NewsId =" + newsId); // other code}
$ _GET ['newsId'] to bring the News ID.
Comments
Post a Comment