Jump to content

How to get the id from url


piyush23424

Recommended Posts

That url looks like it has been rewritten by mod_rewrite, do you have a .htaccess file?

 

no, i haven't made any htaccess file because i need this thing only on one page and .htaccess file may disturb the other pages, so i am avoiding to use it. Please tell me if it is possible with php if it is not possible in php then pls explain how can i do this with .htaccess file.

The url needs to be rewritten otherwise your server will literally look for a file called 123

 

hello,

I have created a .htaccess file as you suggested that is working fine but now it is not linking the css and not even showing any images on the page. I think its because of change in the url

 

 

here is the code for .htaccess file

 

Options +FollowSymLinks

RewriteEngine on

RewriteRule buynote/id/(.*)/ buynote.php?id=$1

RewriteRule buynote/id/(.*) buynote.php?id=$1

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.