Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


I don't know how to resolve this PHP Script error

Posted on 2006-11-15
Medium Priority
Last Modified: 2008-03-06
The message I'm getting is:
Parse error: parse error, unexpected ':' in /home/content/s/c/o/scoard/html/php_uploads/natmailscreenpop.php on line 10

The script I'm using is:
/* natmailscreenpop.php - This script should return a web page depending on the phone number dialed */
if (is_null($channel)) {
  printf("No channel data was given");
else {
  switch ($channel) {
    case ‘18669343739’:
       header(‘Location: http://www.coard.com/natmailscreenpop.htm’);
       header(‘Location: http://www.coard.com/nriascreenpop.htm’);

Any experts help would be greatly appreciated as this script was provided to me by a web based telephony solution provider.  Therefore, I'm NOT a PHP expert.

Thanks in advance!
Question by:ecoard
  • 2
LVL 28

Accepted Solution

gamebits earned 2000 total points
ID: 17951901
header(‘Location: http://www.coard.com/natmailscreenpop.htm’);

header(‘Location: http://www.coard.com/nriascreenpop.htm’);

in both of these line you used backtick (`) you should use quotation mark (')

header('Location: http://www.coard.com/natmailscreenpop.htm');

header('Location: http://www.coard.com/nriascreenpop.htm');


LVL 28

Expert Comment

ID: 17952705
Thanks for the points and the grade.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question