veedeoo 474 Junior Poster Featured Poster

in addition to Mr. Pritaeas's response, this

$regex = '/TITLE>(.+?)TITLE/';

gives us the expected result.

Blank website. Blank site. Nothing to see here.</

Yes, this </ is included. So, it isn't really the same result as

$regex = '/<TITLE>(.+?)\<\/TITLE\>/';

which will give us

 Blank website. Blank site. Nothing to see here.

One limitation of the regex code above is that, it will not give us anything if the title tag is written in lowercase as in html5 standard

$title = '<title>Blank website. Blank site. Nothing to see here.</title>';

to make our regex case-insensitive we can change the regex filter to

$regex = '/<title>(.*)<\/title>/i';

the above should return the title string from either

$title = '<title>Blank website. Blank site. Nothing to see here.</title>';

or

$title = '<TITLE>Blank website. Blank site. Nothing to see here.</TITLE>';

test:

    if(preg_match('/<title>(.*)<\/title>/i',$title,$matches)){
echo $matches[1];

 }

should return the title string from either of the title variables.

veedeoo 474 Junior Poster Featured Poster

@catalinetu,

Welcome to Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hi,

If you are running PHP version 5.3.6 or higher, this should work

<?php

function get_file_ext($filename){

        $info = new SplFileInfo($filename);
        return($info->getExtension());
}

to test the function above try..

echo get_file_ext('05.Judaiyaan [MusikMaza.Com].mp3');

that should output mp3

side notes: If you will be renaming the uploaded file, you need to get the filename without extension. To get the filename without extension, we can simply do it like this.

echo '<br/>'. basename('05.Judaiyaan [MusikMaza.Com].mp3', '.'.get_file_ext('05.Judaiyaan [MusikMaza.Com].mp3'));

the above should give us

05.Judaiyaan [MusikMaza.Com]

make sure to sanitize the filename as suggested above by Diafol.

veedeoo 474 Junior Poster Featured Poster

Hello and welcome.

veedeoo 474 Junior Poster Featured Poster

catalinetu is correct, just add second and third parameter to the get method. Derived from this

public function get($table = '', $limit = null, $offset = null)
{

}
veedeoo 474 Junior Poster Featured Poster

Hi,

You can create a PHP script that will connect to your database to check the clients with payments due. The script should be able to process the payment and update the payment status as needed.

Lastly, create a daily cron job for the script above. This can be done on your cpanel or equivalent.

veedeoo 474 Junior Poster Featured Poster

hi,

here is a similar question about mssql. I did not evaluate any of the claims, but it appears to be promising.

veedeoo 474 Junior Poster Featured Poster

you can use explode if you want.

$this_category = explode(',' , $row['category_id']);

    foreach($this_category as $cat){
        echo $cat.'<br/>';
        }

or if you want to become creative , you can do it like this

foreach((explode(',',$row['category_id'])) as $cat){

    echo $cat.'<br/>';

    }
veedeoo 474 Junior Poster Featured Poster

welcome ..

veedeoo 474 Junior Poster Featured Poster

Thanks @Adrian for bringing that up. Yes, Laravel can do a lot more that what I have presented above by way of Artisan.

In the case of CodeIgniter, codeigniter needs to simultaneously load at least 50 or more files during a single controller requests.

I use this simple PHP function to view all related files both from the system, libraries, and helpers during a simple application's controller request.

<?php

    class Myclass extends CI_Controller{
        private $included_files;

        public function __construct(){

            parent::__construct();

            $this->included_files = get_included_files();

echo 'this application included files:  '. count($this->included_files).'<br/>';

foreach ($this->included_files as $file) {
    echo $file.'<br/>';
}


    }
}    

The above will show the included file count, but that will not show files that are included after the application initialization process e.g. model called libraries and helpers.

If I have a simple login and registration with a template engine like smarty with twig fallback, both of the parent and child constructor above are obligated to load at least 63 files during initialization. I mean at idle when no one is logging in.

below is a test result from codeIgniter. WARNING! this test was conducted just for the fun of it and not something academic in nature. I know the result can be easily debated, but having an approximation as a baseline can help even if the actual application will load half the number of my test results.

C:\server\www\codeigniter3\index.php C:\server\www\codeigniter3\system\core\CodeIgniter.php C:\server\www\codeigniter3\system\core\Common.php C:\server\www\codeigniter3\application\config\constants.php C:\server\www\codeigniter3\system\core\Benchmark.php C:\server\www\codeigniter3\application\config\config.php C:\server\www\codeigniter3\system\core\Hooks.php C:\server\www\codeigniter3\system\core\Config.php C:\server\www\codeigniter3\system\core\Utf8.php C:\server\www\codeigniter3\system\core\URI.php C:\server\www\codeigniter3\system\core\Router.php C:\server\www\codeigniter3\application\config\routes.php C:\server\www\codeigniter3\system\core\Output.php C:\server\www\codeigniter3\application\config\mimes.php C:\server\www\codeigniter3\system\core\Security.php C:\server\www\codeigniter3\system\core\Input.php C:\server\www\codeigniter3\system\core\Lang.php C:\server\www\codeigniter3\system\core\Controller.php C:\server\www\codeigniter3\application\controllers\users.php C:\server\www\codeigniter3\system\core\Loader.php C:\server\www\codeigniter3\application\config\autoload.php C:\server\www\codeigniter3\system\helpers\url_helper.php …
veedeoo 474 Junior Poster Featured Poster

hi,

there are many ways of achieving this. The most simple is to create a session on index.php and then check if the session exists on home.php. If the session does not exist, the user is redirected to the index.php

sample codes

filename: index.php

<?php

    session_start();

    $_SESSION['been_here'] = true;

    header("Location: http://your_domain_dot_com/home.php");
     die();

home.php

<?php

    if(isset($_SESSION['been_here'])){
        ## do all the things you want to do
        }

        else{

            header("Location: http://your_domain_dot_com/index.php");
     die();
     }

you can also do this kind of statement

     if($_SESSION['been_here'] && (isset($_SESSION['been_here']))){

         ## do all the things you want to do

         }

         else{

             ## redirect the unexpected intruder here..

         }
veedeoo 474 Junior Poster Featured Poster

I assumed this can be done in cpanel under default address. This will allow you to catch all email addresses and then pipe it to a PHP program to create the email account.

So, if some_user@yourDomainDotCom is dynamically created, then it will be forwarded to the default forwarding address created in the cpanel. This can be piped in to a PHP program to check if this email address already exists in the database, if NOT then a new account can be created.

Another alternative is to dynamically create a non-existing email address.

For more information on how to pipe application, please read your cPanel documentation.

If you need a simple generator script, please let me know so that I can provide you with example.

veedeoo 474 Junior Poster Featured Poster

@lefteris.gkinis,

Please whatch on my web site and see how the code it looks like...
http://www.panos-oliveoil.gr

It appears to me that you have about 3 <head></head> html tags on your source code?

veedeoo 474 Junior Poster Featured Poster

Pretty much all of the frameworks have a pretty good security. Companies geared in ecommerce development based on Magento will require you to know Zend. Magento is based on the Zend Framework. However, there is a pretty steep learning curve in Zend. You will have to know the basics of MVC design pattern first and then move on to Zend, else prepare to pay a high price for the course being offered by Zend.

There are some companies doing ecommerce development based on CodeIgniter, Laravel and Kohana. Most corporate and business websites are built on CI with foundation or bootstrap. There are some downside to using CI. CI is no longer being maintain by its creator. Meaning, that from that day Ellis Lab ceased their support, you are on your own. Using CI to this date requires you to be able to write your own module. For example, the password module is not as effecient as the latest PHP password hash function found in PHP 5.5.x or higher. You will need to know how to create a modules and helpers for CI so that you can utilize this.

Regardless on which one you learned and mastered, employer will always look for proficiency in OOP, MVC design patterns, and the knowledge and experience in creating an application in either one or two of these frameworks CI, Kohana, Laravel, Zend, or Symfony 2.

If you are crazy like me, learn all of them and you wouldn't be asking this type …

veedeoo 474 Junior Poster Featured Poster

is it a form?

veedeoo 474 Junior Poster Featured Poster

if you do

var_dump($_SESSION["ServiceOrders"]);

, it will give you all the hints you need on how to index the stored session vars.

try it.. :)

veedeoo 474 Junior Poster Featured Poster

the best way to accomplish this is to use css.

#thumb {
clear : both;
width : 100%;
margin-left : 0;
}



#thumb ul {
width : 100%;
}

#thumb ul li {
display : inline;
font-family : arial;
float : left;
padding-right : 5px;
width: 210px; 
height : 280px;

}


#thumb ul li img {
float : left;
width : 200px;
height : 200px;
border : #ccc solid 1px;
padding : 2px;

}

The php code for image can be written like this

echo '<div id="thumb"><ul>';

while($dog = mysql_fetch_array($result)){
$petname = $dog ['BookName'];
echo '<li><P>' . $dog['BookName'] .'</P>';
echo '<img src="'.$dog['Photo'].'" alt="dog" />';
echo '</li>';
}

echo '</ul></div>';

You should update your mysql query to PDO or mySQLI. Don't forget to add the proper html tags for the css file.

veedeoo 474 Junior Poster Featured Poster

Grand Canyon South Rim. Look for the smartest squirrel begging for food in exchange of pretty cool tail swag :).

016c78b730fb005569e5a47b01c7a65b

Zion National Park in Utah.

4146333be8aa6d67d9a8965d513f15ef

veedeoo 474 Junior Poster Featured Poster

Hi and Welcome...

veedeoo 474 Junior Poster Featured Poster

If you can manage to take another 2 years of schooling, you can master in Mathematics and become a professor. That is if you enjoy teaching.

I don't know what else to say, because I myself don't even know what to do with my Bachelor in Mathematics and Bachelor in Physics. So, I decided to go for the graduate school hoping I can work for my government doing some odd jobs only me would know :). I love programming,but never major on it.

veedeoo 474 Junior Poster Featured Poster

trapping the back button is not a good idea. I remember reading an article from the consortium entitled "Use standard redirects: Don't break the back button."

to prevent the form resubmission, we can place a session handler between the final form processor and the form page

form.php ----> sessionhandler.php (validates form and saves form data to session. If everything are valid, redirect user to the final processor) --> formprocessor.php ( process search requests. assign query and form submitted to session).

In the event, the user click on the back button.

formprocessor.php --> sessionhandler.php ( checks for the form submitted and the query. If these two are present, user redirected to the searchresult page. Else, the user is redirected to form page.)

forward flow:

form.php --> sessionhandler.php --> formprocessor.php

reverse flow:(pressing back button)

formprosessor.php -->(isset($_SESSION['submitted'] && isset($_SESSION['query']) ? 'redirect to result page' : 'redirect to form page';
veedeoo 474 Junior Poster Featured Poster

remove all semi-colons following the curly brackets.

if(){

}

else{

}

please refer to the proper syntax usage in PHP here or here. You can also search google for PHP basic construct and semantics.

veedeoo 474 Junior Poster Featured Poster

The problem with the HTML5 is that not all browsers support the same video codec. Because of this, you will have to encode two to three different video formats to support common browsers. This will take more space.

What I can suggest is to use the .mp4 video and deliver it through jwplayer or flowplayer so that if the browser does not support it, the player will go on to the fallback mode which is the flash player loading the mp4 video file. Most mobile supports mp4 videos.

Besides, html5 video is still pretty new. It hasn't even address the security issue, live streaming, and few other limitations. One stumbling block that you will be encountering as your site gets bigger is the video conversion on the server. Unless, you will have a powerful server to utilize ffmpeg in converting one video to three different wrappers e.g. ogg, mp4, webm, flv.

veedeoo 474 Junior Poster Featured Poster

Welcome and hello :).

veedeoo 474 Junior Poster Featured Poster

Just sign-up for your account and get it over with.

veedeoo 474 Junior Poster Featured Poster

cool, welcome..

veedeoo 474 Junior Poster Featured Poster

can you try running this

<?php

     phpinfo();

direct your browser to this page and look for the loaded configuration file. It should tell you which php.ini is being loaded by the xampp.

veedeoo 474 Junior Poster Featured Poster

There is function in PHP called date_default_timezone_set() which can set the default time zone of an application or the runtime configuration.

For example, we can define the default timezone of an application to any timezone supported.

date_default_timezone_set('Europe/London');

if we do this

echo time();

Will give us the timestamp for London. I am not sure if the time is adjusted to DST. If not, then the timestamp will be an hour late to the actual time.

If you have access to php.ini file and if you are allowed to edit it, you can add or define the date.timezone to whatever timezone you want as long as it is supported.

date.timezone = "Europe/London"

Please read this list of supported timezones.

Update:
For mysql, please refer to this documentation.

veedeoo 474 Junior Poster Featured Poster

Hi..

veedeoo 474 Junior Poster Featured Poster

Welcome to Daniweb.

veedeoo 474 Junior Poster Featured Poster

Hello and Welcome.

veedeoo 474 Junior Poster Featured Poster

try adding ORDER BY maker on you query...

veedeoo 474 Junior Poster Featured Poster

If we want FIFO, then we can sort by the date in DESC order. It will be easier if the date is in unix timestamp. Just reverse the order for the LIFO order.

veedeoo 474 Junior Poster Featured Poster

That will not work.. you will need to set the select multiple property and the name attribute to some array.

for example

<select name="color[]" multiple>
<option value="red">
<!-- add more options here -->

</select>

for the php processor, you need to iterate throught the color array(), by using foreach..

example 2

if(isset($_POST['submit']){
foreach($_POST['color'] as $colors){

    echo $colors.'<br/>';
    }
    }

Just to remind you that I am only using the echo for demonstration. YOu can easily pass the submitted value for your database query.

The above codes shown is for multiple selection of colors. For single color selection, remove the array designator.

veedeoo 474 Junior Poster Featured Poster

one of the many ways of doing this is to get the image file extension first.

for example,

$this_ext = pathinfo($filename, PATHINFO_EXTENSION);

The above codes will give us the image extension of the uploaded image.

The next step is to rename the image

$result1 = move_uploaded_file($tmpname, $uploadDir.'.'.$this_ext);
veedeoo 474 Junior Poster Featured Poster

you can use either jwplayer or flowplayer. If you will be targeting mobile users, then flv video should be the fallback video. The ogg, mp4 will be the first two options or better yet go for the VP9 or h264 (These two offers the best video quality just few notches below the HD matroska video container.

veedeoo 474 Junior Poster Featured Poster

I do understand your concerns. I think I have failed to mention that CLI and Composers are highly desirable for the developers who are writing a distibutable applications.

Please allow me tell you a brief story. When I was a young developer, I was only 16 years old ( I really wanted to test my ability to write codes, so I lied about my age. I was a minor and not allowed to work, plus my parents will kill me. All they wanted me to do was to study hard and be accepted at the Princeton University after high shool. I was accepted there and graduated there with a double degree in Mathematics and Physics, so inspite of whatever I did behind my parents back, I did not failed them for whatever dreams they wanted me to be as an adult.), and I was hired by a software company located in Canada. My first job was to remotely provide client support for all propriety web applications they are selling. I was then promoted to code quality assurance, and then finally made me a part of the development team.

Because of the nature of my responsiblities, I was exposed to source codes written by many different developers from excellent, logical, good, bad, horrible, spaghetti, i have seen it all. While I was in this capacity, I was always questioning the Sr. Backend developer about the dependency of the applications. I also laid-out the potential looming problems at the horizon due to …

veedeoo 474 Junior Poster Featured Poster

Hi Iamthwee,

Yes, the further separation of sub controllers would add another level of abstraction. This will allow the developers to be able to control their application like a micro-manager . I have known people who would really cut many corners, but later on found out that they cannot easily get out of the problems created by the bloated controllers.

Here is a simple scenario, let us think of a website having 10000 hits for every 5 minutes and all of these hits are routed to a page. The registration, login, and user's account management are all served by just one controller.

Below is a simple controller commonly found on the web. Amazingly, some MVC books are also trying to propagate the same to their readers.

<?php

    Class Users extends Base_controller{

        public function __construct(){
            parent::__construct();
            }

            public function register_user(){
                $data['form_data'] = $this->model->validate_form();
                $this->load_view('load_form',$data);
                }

            public function validate_login(){
                $data['validation_err'] = $this->model->validate_user();
                $this->load_view('load_account_page',$data);
                }

            public function load_user_dashboard(){
                $data['dash'] = $this->model->get_user_account();
                $this->load_view('user_dashboard',$data);
                }

            public function load_content(){
                $data['content'] = $this->model->get_content();
                $this->load_view('main_content',$data);
                }
            /*
            * they normally add more without limits and without evaluation of any possible consequences.
            */

                }

Let us imagine that a 5th are requesting /yourApplication/register_user/, 2/5 are logging in and will then eventually requesting for their dashboards, the remaining 2/5 just want to read the website contents. Imagine how much stress this particular controller must under-take to serve simultaneus requests from 10000 users. How about the sessions generated behind the scene? How can we solve this problem in a real …

veedeoo 474 Junior Poster Featured Poster

I think Diafol have already given you what you need. Store the submitted information in session.

In fact, you can store them as an array. Below is a sample codes...

$upload_info = array($title, $description, $uploaded_file_name, $other_things_you_want);

$_SESSION['up_data'] = $upload_info;
header("Location: form.php");
exit;

on redirect, the user will land on the form.php. place session_start() on top of the page as suggested above.. we can access the information stored in the session.

echo 'Title : '. $_SESSION['updata'][0].'<br/>';
echo 'Description :'. $_SESSION['updata'][1].'<br/>';
echo 'Uploaded File: '. $_SESSION['updata'][2].'<br/>';

That's pretty much it.....................

Added Later:
You can also do the database insertion here if you desire to do so.

veedeoo 474 Junior Poster Featured Poster

Also, if you have access to a packet tracer from Cisco, this is the best software to practice all these neat things about routing and server settings.

veedeoo 474 Junior Poster Featured Poster

I totally agree with Diafol xampp it is a risky choice for production sites. The only one I tested that is packaged to be production site ready is the uniform server.

To allow the world to access your server, you will need to do some work. First, make sure you have a DNS hosting. If you don't have one for your particular domain, you can sign up for free at freeDNS.afraid.com, and then go to your domain manager panel and use the afraid.com nameservers.

There are two types of IP your computer uses. The first one is the main IP given and assigned to you by your service provider, the second is your computer IP within your network.

To find your main IP go here. That is the IP you will need to fill-in in the afraid.com domain settings.

The second one is the IP of your computer where the xampp is running. You can get this by typing

ipconfig 

or

ifconfig 

for linux

on the command prompt. Your computer IP is more likely the IPV4 address.

836ad667c90af0ab8d382d91cfad0031

If your computer is connected to a cable modem provided by your Internet Service provider, then you will need to accesss the administration panel. On this panel, click on the Application and Gaming tab.

Scroll down the page and look for the IP of the computer where the xampp is running. Do the following port forwarding settings.

on application name …

veedeoo 474 Junior Poster Featured Poster

MVC is the method of operation or patterns found in CI, Symfony2, Laravel, maybe Cake. The only HMVC framework that were evaluated to function as HMVC framework are Kohana and FuelPHP. In the case of FuelPHP, it can function as MVC and HMVC at the same time. Both Kohana and FuelPHP were developed from the early CodeIgniter. I suspect, that the oil in FuelPHP was inspired by the CI's migration.

HMVC stands for Hierarchical Model–View–Controller. Now, please allow me to explain the difference..

In MVC, we make our application's controller like this.

class mycontroller extends baseController(){

    public function index($request){
        $this->load->model('my_model');
        $data['content1'] = $this->my_model->set_index();
        $this->load->view($templateName, $data);

        }
    public function another_request($request2){
            $this->load->model('another_model');
        $data['content2'] = $this->another_model->set_another();
        $this->load->view($templateName,$data);
        }

The above is pretty much confined into this tight one triad pattern. The limitation is that most Controller in a much bigger application is responsible for initialization of the model and view objects. Although the above still demonstates the separation of concerns, the controller above can be grew exponentially and will eventually meet its limit, then the application will fail.

In HMVC design pattern, the application's separation of concerns are expressed or fullfilled in terms of creating parent module and many sub-modules with their own controller-Model-View.

If we convert our simple our controller above to HMVC, we would now have TWO sub-modules called index and another requests with their very own model and view. If we translate this design into a diagramm, it will appear like this

e10714081f3a8d805a91412e306549eb

By implementing …

veedeoo 474 Junior Poster Featured Poster

Hi iamthwee,

Thanks for the response. I will be writing a second part of this tutorial and I will demonstrate how to make the CI migration class to be able to create the application database including the router. So, creating the basic foundation of the application is a brisk. We don't have to create the initial controller, model, and view files.

CLI is a lot faster for testing your application. For example, if we have a CI controller class and we want it tested..

<?php

    class MysimpleClass{

        public function __construct(){
        }

        public function say_something($string){

            echo $string;

            }

            }

CLI can create an instance of the above class just by typing

php index.php MysimpleClass say_something hello world

the output of the above command will be

hello world

Noticed? we don't even have to manually write an object for our controller or class. We can just type it on the command prompt and evaluate if it is working without calling the entire application on browser. So, by using CLI, we can test our class without even creating an object.

Another benefits of using CLI interface is to gain experience in creating an application behind the CLI similar to creating a web application in python. In PHP, we have a similar tool called Composer which intended to serve as a dependency manager which can keep your framework up to date at all times ( developer release dependent).

veedeoo 474 Junior Poster Featured Poster

Hello Everyone,

I wrote this script way back in 2008 as Version1. However, I was forced to forget about this, because it was criticized by many developers with BS, MS, and "Seasoned PHP Developer" under their names. During those days, I couldn't stand up for my own reasons, because I can't even put High School graduate as my lone achievement under my name. I was told this script was 10 steps backward to where we at in 2008. If my memory still served me well, even my own brothers in Silicon Valley have asked me to forget about this.

enough of bad memories behind this script Honestly, I could have developed this into something useful, if I was given just a little moral support.

CLI was introduced in PHP some very long time ago. However, it wasn't popular and most of the people have questioned or were not interested in writing any application VIA the command line Iterface. For some odd reasons, laravel, FuelPHP and others took advantage of the CLI features. Anyone who are familiar with Laravel, Symfony2, and Fuel PHP can easily relate to what I am talking about. Else, my sincere apology for bringing the subject on some relic technology.

I love the idea of being able to generate or create an application through command prompt. This may sound too foolish and Backward in 2008, but today I can easily demonstrate why it is important for new comers in PHP MVC Framework, most imporatantly CodeIgniter users.

Why …

veedeoo 474 Junior Poster Featured Poster

also, you can try running this

<?php
    echo '<br/>'.ini_get('upload_max_filesize').'<br/>';
    echo (ini_get('post_max_size'));
    echo '<br/>'.ini_get('max_execution_time').'<br/>';

    ?>

post back your output...

momonq1990 commented: thank you :D +2
veedeoo 474 Junior Poster Featured Poster

I already uninstalled the laravel on my Development stack, because I am moving on to the Fuel PHP. However, I am worried about the for loop on your script. Will it be possible for you to use foreach loop which is more fitting to your situation? I do understand if you are coming from JAVA, C, and other languages.

In some cases, for loop will give you an error of ' undefined index ' on the last count position on the count function. To investigate it for yourself, please run this.. ( I don't have the chance to test it, but it should point out the points I am trying to convey).

<?php

    $array = array('a','b','c','d','e','f','g');
        for($y=0; $y <= count($array) ;$y++){
         echo $array[$y].'['.$y.']<br/>';
  }

While this one is appropriate and more acceptable in PHP

<?php

   $array = array('a','b','c','d','e','f','g');
       $y = 0;
       foreach($array as $x){
         echo $x.'['.$y.'] <br/>';
            $y++;
        }

To capture the array from the loop above, you will need to reassign the array something like this..

$thisArray[] = $x;
}//end of foreach loop

return $thisArray; // or do whatever you need to do with it.
veedeoo 474 Junior Poster Featured Poster

For a site with lots of content, I think it is worth implementing. Another scenario where breadcrumbs is useful is when you have a hierarchical categories like

Automotive
  Make
      Acura, BMW, Chevrolet, Infiniti, Jaguar, Lexus, Mercedes
   year
       2000,2001,2014
   Color
       red, blue, yellow, black, orange
   Drive
       front wheel, rear wheel
   Effeciency
       Surface Street
       10 - 20 MPG, 21 - 40 MPG
       Highway
       10 - 20 MPG, 21 - 40 MPG

The breadcrumbs for the above would be [Automotive][Make][Year][Color][Drive][Effeciency]. The user can move from one item to the other, because the link will be assigned in the router. So, when the Make is clicked, the controller Automotive will be instantiated and the method Make will get executed. The initial selections are stored in session so that the user can hop around.

The controller would be the Automotive and the methods connected to the model are

Make // sorts the model 
Year // sorts year
Color //sorts color
Drive //sorts Drive
Effeciency //sorts effeciency

The route would be

automotive : 'automotive';
year       : 'automotive/year';
Color      : 'automotive/color';
drive      : 'automotive/drive';
effeciency : 'automotive/effeciency';

Here is a light breadcrumbs library for CI and pretty much the implementation is pretty much similar to my example above.

veedeoo 474 Junior Poster Featured Poster

You have all the reason in the world to achieve your grandest dreams. Imagination plus innovation equals realization. - Denis Waitley

A spirit of innovation is generally the result of a selfish temper and confined views. People will not look forward to posterity, who never look backward to their ancestors. - Edmund Burke

veedeoo 474 Junior Poster Featured Poster

Dude,

It is my lazy day today.. so, I will be cutting corners here. Instead of writing a 100 lines of codes for your processor, let's do it this way.

Copy codes below onto your OnlineOrders.php

if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit'])){

    echo 'if($_SERVER[\'REQUEST_METHOD\'] == \'POST\' && isset($_POST[\'submit\'])){ <br/>';

        foreach($_POST as $name => $submitted_value){

    echo '$'.$name.' = $_POST[\''.$name.'\']; <br/>';

    }
            echo '}';
        }

Direct your browser to your form page and submit the form. Once the browser is redirected to OnlineOrders.php, you should be looking at PHP codes on the page. Copy those codes and paste it on the OnlineOrders.php and save it as your form processor. You can add a little more codes to save it to your database or anything to serve for your purpose.

I am always amazed what I am capable of whenever I am having a lazy day... :) :)

don't forget to add

<?php

on top of the page... :)

Update:

I just want to add that this part of the codes above

 $submitted_value

That can be referenced later on for validation e.g. integer, empty, null, string, or whatever

veedeoo 474 Junior Poster Featured Poster

Just to add more info., here is a good example of a PHP script that can compile C .

I prefer using the exec("your_compiler_command_here 2>&1", $res, $err);

$res and $error are the text file error log.

That's all I can tell you. I am pretty rusty with C. The last time I played with it was, when I was trying to write a game about two characters throwing bananas at each other.