PDA

View Full Version : Unexpected T_string



bmorrow
07-04-2007, 06:34 AM
Anyone know what this means?
I find it when I publish the action.php page after I've copied the code into the HTML.
www.hamiltonhomereview.com/househunters.html
Bob

Watdaflip
07-04-2007, 07:07 AM
Post the code for action.php, you probably have some text that isn't enclosed in a " " or ' ', or something like

echo "blah blah " blah " blah "; where the third blah isn't enclosed in quotes.

If I see the code I can fix the error

bmorrow
07-04-2007, 07:10 AM
Thanks. I'm trying other things and am getting confused but I'll go back to step one and check everything.

bmorrow
07-04-2007, 07:28 AM
Here's the code I'm using on my test page which only has one field and the submit button. The page is: www.hamiltonhomereview.com/househunterstest.html


<?PHP
$mailto = "bmorrow@execs.com";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
}
$mailsubj = "Jointheclub";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "name","Button1":\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>

navaldesign
07-04-2007, 08:05 AM
Here's the code I'm using on my test page which only has one field and the submit button. The page is: www.hamiltonhomereview.com/househunterstest.html (http://www.hamiltonhomereview.com/househunterstest.html)


<?PHP
$mailto = "bmorrow@execs.com";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
}
$mailsubj = "Jointheclub";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "name","Button1":\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>

The line in red is wrong, should be something like

$mailbody = "Info submitted from our web form : \n";

Why did you place "name" and "Button1" in there ?

bmorrow
07-04-2007, 05:35 PM
I thought you were supposed to name the fields. I guess not.

Watdaflip
07-04-2007, 05:37 PM
If you want to use submitted data you need to do 2 things

1) create a variabled

$name

2) retrieve the posted data from the form

$name = $_POST['name'];

bmorrow
07-04-2007, 07:59 PM
Thank you so much for your help Watdaflip and naval design. The form works great, the most complicated page I've done yet. Should boost my prospect marketing targets immensely.
One other question that's not related. When I relaunch my site, I won't need some of the old published pages. How do I erase them off the web?

Andy128
07-04-2007, 08:52 PM
Use the FTP Manager. This will bring up a window of files on your computer on the left and on the right -will be the files on your server. Delete those that you desire off the server. !!Once you delete them from the server- they are gone....gone...gone...- so make sure they are the ones you want deleted.

Andy

bmorrow
07-11-2007, 12:15 AM
Thanks Andy, that's awesome! It's so simple when you've got help.

Andy128
07-11-2007, 12:18 AM
You are very welcome.

Andy

bmorrow
07-11-2007, 12:32 AM
Okay, went too fast. I got into FTP Manager through the Cpanel but have no clue what to do then. How do I log in to get to the columns you speak of?

Andy128
07-11-2007, 12:51 AM
Not through cpanel. Open the BV web builder program and then click on Tools and then FTP Manager ( I believe as I am not at my computer) Then click on connect on the left side under the Menu Bar. This will allows you to move or FTP files, pages, photos, folders from computer to server and vice versa. You can also use it to delete files, folders, photos,etc.... Simply right click on the file, folder, webpage and then choose delete.

Andy

bmorrow
07-13-2007, 08:04 PM
Okay, now I feel really stupid. WHen I open up Blue Voda, I don't see Tools anywhere. I see Toolbar and all the tools used to work on a page, but no FTP Manager.

navaldesign
07-13-2007, 08:12 PM
Do you have the top Text toolbar ? The one saying File Edit View Insert Format ....... Tools Window Help ? If not, right click on any part of the top bar and when the menu opens, check the "Menubar" checkbox.

bmorrow
07-14-2007, 04:57 AM
I'm missing something guys. When I go into Blue Voda, and right click at the top of the page, I only get three pull down menu options: File, View, Help. There is no Tools, Insert, etc.