Consider below url.
www.yourdomain.com/pagename.php?id=10
In pagename.php file, we should add below code to use this querystring parameter ‘id’.
$id=$_GET[‘id’];
Based on server setting or php.ini values, we can use $id even without using above code.
(i-e PHP variable ($id) will be automatically created based on name of the querystring parameter (‘id’) and querystring value will be assigned to this PHP variable.)
But the good practice is, we should always use the explicit assignment (e.g $id=$_GET[‘id’];) to avoid unnecessary issues which will occur if the server setting doesn’t allow the automatic assignment.
More Articles...
Shop at Rajamanickam.com | Birthday Gift Idea? | Hire me for $6 per Hour
Get 3 useful ebooks for Rs 99 in India and $5.99 globally
Get a 75% commission | ChatGPT and and Google Gemini for Beginners (Use Discount code QPT)
Search This Blog
Art of Talking to AI | Tech eBook | Dream Big | Listen to Dream Big
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
Today's Deals | Timesheet | Products | 3 ebooks for $5.99 / Rs 99 | Earn 50% commission
About | Privacy | Follow | TOS | WhatsApp | Contact
I may earn a commission from Amazon affiliate links
No comments:
Post a Comment