?
Solved

I need to change this into CGI please help Urgent

Posted on 2004-10-19
7
Medium Priority
?
217 Views
Last Modified: 2013-12-25
If it is wrote in perl how do I include it in an html page to call it

the  script

if(isset($account)) {
$contents = file_get_contents("bia.dat");
if (strpos($contents, $account) === false) {
$alert2 = "";

}
else {
$alert2 = "Alert Account Exists";
   echo $alert2;
}
}


this is what i had in the html page

<?php $ip = "12233432"; $account ="6763364"; include ("check.php") ?>

Thanks
0
Comment
Question by:hewtluca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 12351933
Your script is neither Perl nor PHP nor shell script.

It seems to be a combination of all three, hence it won't run.

First you need to decide which language you want to use, then we can work on how to call it.

If you really want Perl, then you call it via SSI or CGI.
0
 
LVL 2

Author Comment

by:hewtluca
ID: 12351965
Uh..... It is a php script .... I know for sure!!! I wrote it.  And it is what I do for a living. I just did not put <?php ?>

All I want is to have it changed into cgi I am a Php programmer not CGI

Thanks,

Hewt
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12352677
I'm sure PHP doesn't use === for comparisons.  I think you meant ==

To turn it into a CGI script, you just need to add a MIME header to the output,:

Content-Type:  text/html

Make sure you have a blank lline after the header.

Not familar with PHP, but I assume you do

echo "Content-Type:  text/html\n\n"
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Accepted Solution

by:
mrielf earned 2000 total points
ID: 12386507
You can include perl with SSI (server side include)
see: http://www.htmlgoodies.com/beyond/ssi.html

Include ssi in your shtml file

<!--#exec cgi="/cgi-bin/script.pl?account=6763364" -->

0
 
LVL 5

Expert Comment

by:mrielf
ID: 12386510
0
 
LVL 13

Expert Comment

by:StormyWaters
ID: 12389279
>>  I'm sure PHP doesn't use === for comparisons.  I think you meant ==

=== returns true if the values are equal and of the same type.

http://us2.php.net/manual/en/language.operators.comparison.php
0
 
LVL 48

Expert Comment

by:Tintin
ID: 12390712
Shows you how much I know about PHP.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

650 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