473,788 Members | 3,101 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unexpected T_STRING in D:\intranet\inc lude\qaDatabase Lib.php on line 44

Hello,
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbT able,$SQLstat)
// END OF LINE 44
{

global $dataRow, $db, $SQLstat, $Result;

if (!($db = odbc_connect('$ SQLstat','sa',' ')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if

// Result error check
if (!($Result = odbc_exec($db,$ SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessa ge($db);
print ("'<span class=\"error\" > $errorMsg </span>'");
exit;

}//end if
}

$dataRow = odbc_fetch_arra y($Result);

}
Jul 17 '05 #1
3 2003
Paul wrote:
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbT able,$SQLstat)

___^^___

did you mean function? or was this a copying error?
Anyway, if the error generated somewhere else than line 44 that was
*before* this line. Show the code from the start to line 44 instead (no
use for us to look for errors in line 44 forwards)
--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #2

On 31-Mar-2004, pa**@sysxperts. com (Paul) wrote:
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbT able,$SQLstat)
// END OF LINE 44
{

global $dataRow, $db, $SQLstat, $Result;

if (!($db = odbc_connect('$ SQLstat','sa',' ')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if

// Result error check
if (!($Result = odbc_exec($db,$ SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessa ge($db);
print ("'<span class=\"error\" > $errorMsg </span>'");
exit;

}//end if
}

$dataRow = odbc_fetch_arra y($Result);

}


You spelled function wrong.
--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@wil lglen.net (it's reserved for spammers)
Jul 17 '05 #3
DOH!! Thanks guys, that was staring me right in the face and i missed
it - always good to have more eyes around - so used to having this
error from a missing " ; or { or something that i wasn't even thinking
to check for spelling errors.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2887
by: Salim | last post by:
Hi people, keep getting this errorParse error: parse error, unexpected T_STRING in order_fns.php line 91. the code is below for the file and I've indicated line 91 <?php function process_card($card_details) { // connect to payment gateway or // use gpg to encrypt and mail or // store in DB if you really want to
2
4086
by: movieman21 | last post by:
Hey everyone, I'm new to PHP, and to MySQL. I want this script to allow me to input a value from a form (name) into a MySQL table (test table in test database). Here's the form: <form action="sql.php" method="POST"> Name:<input type="text" name="name" maxlength="10"> <br /> <input type="submit" name="submit" value="Submit Data"> And here's sql.php: <?php // Make a MySQL Connection
4
22163
kestrel
by: kestrel | last post by:
I have some html code that is supposed to be displayed by php echo. But for some reason i keep getting a syntax error, and i cant figure out what is going on. Heres what i have <?php if(isset($_GET)) { echo "<div id="visible">"; echo "<span onclick="swapform()">Log In Form</span>"; echo "</div>"; echo "<div id="theform" style="visibility: hidden">";
36
8010
by: rhys | last post by:
My Gurus and Angels -- Please pardon this old-school programmer, only recently enlightened to open-source, having been trapped in the convenience of proprietary lingos for way too long. My shortcomings will soon become apparent. I am developing an estimating construction system, using PHP5 and MySQL 5.0.24a with Ubuntu. I have a main "projects" file, and 2 detail files, one for piping and one for equipment. Each of these files will have...
13
30578
by: Anne Bos | last post by:
After uploading a php file I got back the error message 'unexpected T_STRING on line 1'. Line 1 is <?php session_start() ?>. The servers php version is 5.2.1. By the way, what is a T_STRING. I can't find that on php sites. Any suggestion is appreciated. Anne Bos
6
2621
by: goodguyjam | last post by:
Hi all, I'm having trouble with mysql. I've just finished my php coding for HTTP authentication and with some help am now getting a login window pop up whenever I click on a link on my website that directs to Auth.php. The code for this is below: <?php /* Program: Auth.php * Desc: Program that prompts for a user name and * password from the user using HTTP authentication.
3
5597
paulrajj
by: paulrajj | last post by:
hi to all, i am getting syntax error on my code.. Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\xampp\htdocs\Dummy\paulraj\matrim\exam.php on line 62 what's the actual problem here..? my code
11
2936
by: JRough | last post by:
I'm trying to use output buffering to cheat so i can print to excel which is called later than this header(). header("Content-type: application/xmsdownload"); header("Content-Disposition: attachment; header("Pragma: no-cache"); header("Expires; 0"); print "$header\n$data";
0
1808
by: JRough | last post by:
On Sep 26, 3:23 pm, Captain Paralytic <paul_laut...@yahoo.comwrote: without the exit I get this again: Warning: Cannot modify header information - headers already sent by (output started at /home/allrail/public_html/header.php:40) in /home/ allrail/public_html/header.php on line 39 as well as this: Fatal error: Cannot redeclare maketr() (previously declared in /home/ allrail/public_html/templates/menu.php.html:24) in /home/allrail/...
10
5671
by: benicio | last post by:
Parse error: syntax error, unexpected T_STRING, expecting '(' in C:\wamp\www\study_group\includes\functions.php on line 19 I got this error and this syntax is from 8 to 19th line. <?php $subject_set = get_all_subjects(); while ($subject = mysql_fetch_array($subject_set)) { echo "<li>{$subject}</li>"; $page_set = get_pages_for_subject($subject);
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.