PHP script for customer service issue

Reply

Join Date: Mar 2008
Posts: 129
Reputation: justinmyoung is an unknown quantity at this point 
Solved Threads: 0
justinmyoung justinmyoung is offline Offline
Junior Poster

PHP script for customer service issue

 
0
  #1
Mar 31st, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 150
Reputation: sDJh is an unknown quantity at this point 
Solved Threads: 13
sDJh sDJh is offline Offline
Junior Poster

Re: PHP script for customer service issue

 
0
  #2
Mar 31st, 2008
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? ...";
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC