Monthly Archives: October 2012

Generate Order Number

That’s what I’ll do. As for formatting the number, here’s what I did…

$id_num = 5;
$order_num = sprintf("NSC-%010d", $id_num);
echo $order_num;

That gives me a number like…

NSC-0000000005

So if the $id_num is 2044 then the zero spaces will account for the larger id number and give me…

NSC-0000002044

Figured I’d post it, in case anyone else needed something similar. Thanks again!

Thanks to wilhud

Remove index.php from CI

Hi,
I am previously fail to do this. But Now I am success.
big thanks to CI forums for helping me out.

You just need to create a .htaccess in your root and use these codes

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]  

Hope this will help someone.

Thanks.

%d bloggers like this: