| | |
PHP script for customer service issue
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2008
Posts: 129
Reputation:
Solved Threads: 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.
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.
•
•
Join Date: Aug 2005
Posts: 150
Reputation:
Solved Threads: 13
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? ...";
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? ...";
![]() |
Other Threads in the PHP Forum
- Previous Thread: displaying mediumblob images using php
- Next Thread: Real-Time Currency
| Thread Tools | Search this Thread |
301 apache api array autosuggest beginner beneath binary broadband broken button cakephp checkbox class cms code compression countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html httppost image include insert integration ip javascript joomla limit link links login mail match md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf php problem protocol query radio random recursion remote script search searchbox server session sessions sms smtp source space sql strip_tags survey syntax system table tutorial undefined update upload url validator variable video virus votedown web window.onbeforeunload=closeme; youtube





