•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,458 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,014 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 212 | Replies: 4
![]() |
•
•
Join Date: Apr 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
I'll make this real short - don't know much about PHP. This form was created and then run through a utility that sets all required fields. I am getting a T_string error message in line 1. If someone can help I would greatly appreciate it. I am attempting to include the actual form named form.php in my template and that is when I get the error message. It seems to load fine by itself but when included doesn't work
Here's the URL - http://www.southernsoftwaresolutions.net/contact-us.php
Thanks in advance
Here's the URL - http://www.southernsoftwaresolutions.net/contact-us.php
Thanks in advance
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 547
Reputation:
Rep Power: 3
Solved Threads: 55
•
•
Join Date: Apr 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Ooops...sorry - here are the first 30 lines - as stated line 1 is the culprit according to the error message. This is from form.php. If more of the code is needed please let me know OR is the issue my contact-us.php page and something in/above the DOCTYPE??
Thanks
Thanks
<?php
foreach($_POST as $key => $value){
if (is_array($value)) {
$_values[$key] = join("%,% ",$value);
}else $_values[$key] = $value;
$_values[$key]=stripslashes($_values[$key]);
}
if (!isset($_POST["_referer"])) {
$_referer = $HTTP_SERVER_VARS["HTTP_REFERER"];
}else $_referer = $_POST["_referer"];
function Display_Checkbox($_field, $_value, $full = true){
if ($full) {$st = "<input type=\"checkbox\"";}
$array = split("%,% ",$_field);
foreach($array as $key){
if ($key == $_value) {
$st .= "checked";
break;}}
if ($full) {$st .= " disabled>";}
return $st;}
function Display_Selected($_field, $_value){
$array = split("%,% ",$_field);
foreach($array as $key){
if ($key == $_value) {
echo "selected";
break;}}} Last edited by rebelbwb : Apr 12th, 2008 at 11:47 pm.
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 11
I have run the code on my local system and i'm not getting a T_string error message.
Have you posted the full code from the contact.php file?
Have you posted the full code from the contact.php file?
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the PHP Forum
- Previous Thread: page1Form.php to page2Form.php
- Next Thread: Selectbox


Linear Mode