954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP script for customer service issue

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.

justinmyoung
Junior Poster
133 posts since Mar 2008
Reputation Points: 22
Solved Threads: 1
 

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? ...";

sDJh
Posting Whiz in Training
259 posts since Aug 2005
Reputation Points: 56
Solved Threads: 29
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You