
thara
Members-
Content Count
54 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout thara
-
Rank
Advanced Member
-
I am trying to make SEO friendly URLs of using apache mod_rewrite. My normal URLs is something like this - index.php?p=about index.php?p=contact index.php?p=this My expecting SEO friendly URLs should be something similar to this - localhost/php_advance/ch02/about localhost/php_advance/ch02/contact localhost/php_advance/ch02/this I tried it with creating a .htaccess file and doing some changes to my apache httpd.conf file. This is my .htaccess file <ifModule mod_rewrite.c> # Turn on the engine: RewriteEngine on # Set the base to this directory: RewriteBase /php_advance/ch02/ #
-
I have modified form_functions.inc.php to radio button for suit for me. But It seems its not working.. This is my code so far.. from form function if (preg_match('/sex\d{1}$/', $name)) { $i = substr($name, -1); $name = substr($name, 0, 3); $sex = array(1=>'Male', 'Female' ); // Display the error first: if (array_key_exists($name, $errors)) { echo ' <span class="inline-error">' . $errors[$name] . "</span>\n"; } echo '<input type="' . $type . '" name="' . $name . '"
-
Hello... I have a form to get some urls from users. Eg: Web Address, Facebook Address, Twitter Address, Google+ address etc... My problem is how I validate these urls when they submit the form. I tried to validate URL in PHP by using the FILTER_VALIDATE_URL or simply, using regular expression. Here, I would like to know what are the best methods to get such a urls from users. Is it always good to let them to enter protocol? sometimes they may not know it is http, https, ftp, ftps.. etc. I think it is something hard to do some users. I tried something like this using FILTER_VALIDATE
-
thanks for reply.. SQL return the values properly...there are category_id, category_name, subject_id, subject_name. I have started the session properly in my configuration file and have included to this page. I am trying to display above return data into a list something like this.. Catagory 01 subjects1 subjects4 subjects2 subjects5 subjects3 subjects6 Catagory 02 subjects1 subjects4 subjects2 subjects5 subjects3 subjects6 Catagory 03 subjects1 subjects4 subjects2 subjects5 subjects3 subjects6 I tried to do it like this. Its working as 50%.
-
I am going to create a HTML form dynamically with php. Using that form users can select subjects under different category. A category and Its subjects have broken to one logical section and have applied jquery accordion. In my form I need to create more logical section like that. this is the HTML structure of the form..(which need to create dynamically with php) <form action="" method="post"> <div id="accordion"> <!-- logical section 1 --> <div> <h3>Category 01: <span>category name</span><span></span></h3> <div class="co
-
hi.. everyone.. This is a sql query problem that I have uncounted and have been in the same script for hours. But Still I couldn't get it to work. I need to get a image from database and its type should be one of a value from my $designation array. The query should check $designation array's value with database and if its match with one of a value in database then query can retrieve one row. This is my designation array. its value I use for image type in my db. $designation = array ( 'Managing Director', 'Manager', 'Director', 'The Principal', 'Deputy Principal', 'Proprietor
-
Yes.. I used tutor_institute directory and sometimes used lanka_institute directory too for experiments porpose. when I use both directories I did it correctly in my htaccess and browser url. But still I couldn't it to get working. actually what has happend there... I followed more online tutorials to subject and all of them are fomfort for me. but I cant get it work in my project... any comments are greatly appreciated. Thank you..