PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
shafiq2626
Forum Commoner
Posts: 88 Joined: Wed Mar 04, 2009 1:54 am
Location: Lahore
Contact:
Post
by shafiq2626 » Thu Jul 12, 2012 2:58 am
Hi to all.
I have a data in news panel and also I saved slug against this value.
My link make like this.
http://ilm.com.pk/portal/events/this-is ... ther-event
So How I can detect Id from slug to display data.
My Query is like this
Code: Select all
$sql = $this->MMdbobj->query("SELECT * FROM tbl_news where news_id=$_REQUEST[event_id]");
$sendcontents = $this->MMdbobj->fetch_assoc();
How will I Get Event Id from Slug /this-is-new-another-event
Please help.
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Thu Jul 12, 2012 4:02 pm
What values do you have in $_REQUEST?