Jump to content
Larry Ullman's Book Forums

thara

Members
  • Content Count

    54
  • Joined

  • Last visited

Community Reputation

0 Neutral

About thara

  • Rank
    Advanced Member
  1. 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/ #
  2. 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 . '"
  3. 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
  4. ok.. thanks you. also I would like to know is there another way to get the same result using HTML table format like I posted above?
  5. Thanks for your sugestion. But can you tell me..How can I get <li> items into 2 columns?
  6. Thank you HartleySan... this is a link for a image.. http://www.freeimagehosting.net/6sfhz I think you will get an idea actually what I am going to do whit this.. thanks again...
  7. Oops.... My image is not displaying wiht my post.. can you please tell me how can I attach an image with this post...? I tried to find an option but fail to find.
  8. this is a screan shot showing actually what I am tring to do is... Each category has its own subjects and those subjects need to display in a table with 2 columns.
  9. 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%.
  10. 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
  11. Thanks for all answers.... I got a solution using IN() in mysql... thanks again..
  12. thanx for response. My table is institute_images and it has image_id, image_name, image_type, institute_id coloumns. designation array's values I use for image_type values. In my query I need to check is there any images in db with image_type value is one of my designation array's value.
  13. 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
  14. 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..
×
×
  • Create New...