cancel
Showing results for 
Search instead for 
Did you mean: 

Will an email form in flash work via PHP on my site?

Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Will an email form in flash work via PHP on my site?

Hi all,
I'm in the process of creating a flash site for myself to put up on the space that comes with my plus net account.
I want to add an email form to my flash site so people can contact me without having to go to their email client but I'd like to confirm if it's possible with the plus net servers as I'm under the impression that some servers don't allow it via PHP.
I've tried testing the php by putting a small php file online but when I go the file in Firefox it just wants to download the php file rather than run the email script to send the test mail. Does this mean it's not possible or I have made some mistake?
The script was:
<?
mail("yourname@yourdomain","test","Ok, it works");
?>
I know nothing about PHP I'm afraid and I'm just following some tutorials to try and get the form working.
Ta
47 REPLIES 47
Peter_Vaughan
Grafter
Posts: 14,469
Registered: ‎30-07-2007

Re: Will an email form in flash work via PHP on my site?

Sounds like you have put the php file on your www webspace. You need to activate and use your ccgi webspace for php files.
See help & support for ccgi
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

OK will do.
Without wanting to sound too much of a rank amateur, but what is CCGI?
Scrub that. I've found the help files and will actually bother reading them Cheesy
Cheers
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Will an email form in flash work via PHP on my site?

Plusnet webspace is split in to two halves.
The main Homepages server provides a method of serving up 'static' content.  These are generally basic HTML pages or images.
The CCGI server handles serving up 'active' content, such as PHP.
They are split for historical security and performance reasons.
To activate your CGI account, visit the Website Settings part of the portal, and go to the CGI option, then "Activate CGI"
You can then access your CGI space by ftping to ccgi.plus.net
Anything you upload will be available at: ccgi.<username>.plus.com/
B.
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

Thank you.
I've gone to my webite settings but all I have is a "My Webspace" button and no reference to ccgi. No activation button or anything. Has it ran away from me all scared because I don't know what I'm doing Huh
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Will an email form in flash work via PHP on my site?

What type of account do you have with Plusnet?
IIRC, some of the dial-up accounts didn't come with CGI access but I would have expected any of the ADSL accounts to provide CGI?
B.
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

I have a Broadband Plus Account.
Should I raise a ticket?
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Will an email form in flash work via PHP on my site?

Probably a good idea - I believe the Broadband Plus accounts should have a CGI component. 
Raise a ticket requesting the CGI component is added to your account, and include a link to this forum thread.  Hopefully that should get fixed fairly soon (unless one of the PN bods on the forums pick it up first :))
B.
Chris
Legend
Posts: 17,724
Thanks: 600
Fixes: 169
Registered: ‎05-04-2007

Re: Will an email form in flash work via PHP on my site?

Unfortunately BB Plus accounts don't have ccgi access. All the current BBYW accounts allow access to this.
You can have a look at what you get on the BB Plus product here:-
Linky Linky
Former Plusnet Staff member. Posts after 31st Jan 2020 are not on behalf of Plusnet.
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

Hmmph  Cry
Thanks for clarifying Chris.
The thing is, I don't want a BBYW product as I don't like the peak usage times. I like my BB+.
If I ask nicely, is there a way of getting a cgi activation, or am I wasting my time? Do you think raising a ticket might help?
I only need to add a php file with this on:
<?php
$sendTo = "myemailaddress@whatever.co.uk";
$subject = "Website response";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["comments"];
mail($sendTo, $subject, $message, $headers);
?>
I'd be grateful if any Flash wizards out there might be able to offer up any alternatives that don't rely on PHP (if that's possible).
Chris
Legend
Posts: 17,724
Thanks: 600
Fixes: 169
Registered: ‎05-04-2007

Re: Will an email form in flash work via PHP on my site?

It's possible but not guaranteed that I might be able to get some cgi space. However there is no way to add an SQL database to your account as there is no association between BB+ accounts and the SQL component.
Former Plusnet Staff member. Posts after 31st Jan 2020 are not on behalf of Plusnet.
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Will an email form in flash work via PHP on my site?

Chris: I think the OP's request is unlikely to require an SQL component Wink
Flash 'objects' are run in the context of the local machine, so sending a mail with them is almost certainly going to require using the local mailing software.
Lets see if Chris can wave some sort of magic wandage over the CGI server for you Smiley
B.
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

That would be great!
I have no intention of using SQL. I just want to create the mail back form on my flash site.
Any help is appreciated. Ta.
EDIT:
Just gone to my Member Centre and I have a new shiny CGI Button. Yay! Thanks so much Cheesy
Now I've just got to see if I can get the flash action to access this new space.
Chris
Legend
Posts: 17,724
Thanks: 600
Fixes: 169
Registered: ‎05-04-2007

Re: Will an email form in flash work via PHP on my site?

You'll have to wait a few hours for this to activate properly (if it does at all). Fingers crossed.
Former Plusnet Staff member. Posts after 31st Jan 2020 are not on behalf of Plusnet.
Beetroot_Bertie
Grafter
Posts: 80
Registered: ‎31-07-2007

Re: Will an email form in flash work via PHP on my site?

OK. I'll give it a try later on today.
Thanks for your help everyone.