0

Hi,

I'm interested in writing a PHP script that will allow a customer with a job number (ticket number) & a login password the ability to access their account within my database, and therefore have information on the status of their order. I'm only learning PHP, and any help or advice as to what direction I would need to take would be very much appreciated. I know some basics.

Thanks in advance.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by sDJh
0

PHP is very simple and that's the reason why it is so popular.

So doing it step by step:
0) get a homeserver (Apache with PHP and MySQL - you can use Xammp).
1) Set up a database and save job number and the password together with the article (eg `nb`,`pw`,`art`)
2) write a systemfile in db and put your code in simple functions:
function opendb()
mysql_connect...
end function
function checkjob($nb,$pw){
opendb()
$r=mysql_query("SELECT `art` FROM `db` WHERE `nb`=".$nb." AND `pw`=".$pw);
$a=mysql_fetch_row($r);
return $a[0];
}
and so on.
3) write you code. $art=checkjob($nb,$pw);
echo "You article is: ".$art.". How can I help you? ...";

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.