Solved

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

Posted on 2006-11-15
2
210 Views
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:
<?php
/* natmailscreenpop.php - This script should return a web page depending on the phone number dialed */
$channel=$_POST[‘Channel’];
if (is_null($channel)) {
  printf("No channel data was given");
}
else {
  switch ($channel) {
    case ‘18669343739’:
       header(‘Location: http://www.coard.com/natmailscreenpop.htm’);
       break;
    default:
       header(‘Location: http://www.coard.com/nriascreenpop.htm’);
       break;
  }
}
?>

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!
0
Comment
Question by:ecoard
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 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');

Gamebits

0
 
LVL 28

Expert Comment

by:gamebits
ID: 17952705
Thanks for the points and the grade.

Gamebits
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now