i need to create a counter

jmad

New Member
i need to set up a counter so i can make a session id no. can i do it using php? if not what should i use i cant use asp on the bassis that i dont know it i am using linnux and i have no funds for licenseing. any information would be useful thanx.
 

zkiller

Super Moderator
Staff member
what's a counter got to do with a session id number? but yes, php does support session variables. i don't however know the code, as i do not use php.
 

jmad

New Member
i know the session code but i want to add a diffrent number to every person that hits an order button so i can track their order. or if there is a better way of doin it i am all ears.

<?php session_start();

?>
 

zkiller

Super Moderator
Staff member
you will need to have a unique key field in your database table anyways. most people have it auto filled with a random number created by database itself. why not use that as the order number? might save you some time too.

the other way would be to call the last order number from the database and then just add 1 to it. the total sum would then be your order number for the next order.
 

jmad

New Member
thank you thats a great idea i am going to try n make a my sql db n make a id number collmn. thanks again.
 
Top