User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Apr 2008
Posts: 3
Reputation: rebelbwb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rebelbwb rebelbwb is offline Offline
Newbie Poster

T_string error message

  #1  
Apr 12th, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 547
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 55
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro

Re: T_string error message

  #2  
Apr 12th, 2008
we need the code to help solve your problem. can you post it?
Reply With Quote  
Join Date: Apr 2008
Posts: 3
Reputation: rebelbwb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rebelbwb rebelbwb is offline Offline
Newbie Poster

Re: T_string error message

  #3  
Apr 12th, 2008
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

<?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.
Reply With Quote  
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation: phper is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 11
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: T_string error message

  #4  
Apr 13th, 2008
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?
If you find my post useful please add to my reputation!! Thanks!

ajtrichards web solutions
http://www.ajtrichards.co.uk
Reply With Quote  
Join Date: Apr 2008
Posts: 3
Reputation: rebelbwb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rebelbwb rebelbwb is offline Offline
Newbie Poster

Re: T_string error message

  #5  
Apr 13th, 2008
No, I haven't. It's rather lengthy. If you were able to PM your email I could send both files.

Thanks


Originally Posted by phper View Post
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?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 1:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC