Search the Community
Showing results for tags 'how-to'.
-
Hi all, I'm working on a hobby project to improve my skills and learn PHP and MySQL. Don't know if this is the right place to ask this question, so please let me know if it isn't. I already created a single user site. It has a simple PHP login and after login information (like personal information and messages) is pulled from the database and shown. The personal information is stored in a table called settings and the messages are stored in a table called messages. I like to go to the next level and create a multi-user login, but I have no idea were to start. I think I have to switch to another login type were both PHP and MySQL are used. How has the database be designed? Can I use the same structure as in the single user site I created? How can the right (belonging to the user) information be retrieved from the database? Thanks in advance !
-
Hello PHPFreaks Been a long time since i've been here last time! (hopefully it means that i'm getting better However! I'm playing around with "new" technology the mod_rewrite for the .htaccess file. I'm writting a php app where the url has 2 parameters. example.com?path=this/is/a/path/to/this/&slug=page NOW my dilemma is that my .htaccess rules work IF there is NO / (slash) in the ?path= var (since I separate the 2 vars at a /). my question is now! (bear in mind here that i'm a ROOKIE at .htaccess rewriting) how do i go about in the .htaccess file to make it reconize that whatever comes after the last slash the $2 variable and everything is $1 - even if there is no $path defined in the url? BTW! I'm not looking for free handouts and do my coding here! I'm willing to learn here but just need pointers!! I've pasted my .htaccess file here: Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_URI} !=/index.php RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)$ /index.php?slug=$1&type=$2&view=$3&action=$4 [L,PT] RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)$ /index.php?slug=$1&type=$2&view=$3 [L,PT] RewriteRule ^([^/.]+)/([^/.]+)$ /index.php?path=$1&slug=$2 [L,PT] RewriteRule ^([^/.]+)$ /index.php?slug=$1 [L,PT] RewriteRule ^(.+)/$ /$1 [R=301,L] Thanks in advance