473,772 Members | 2,442 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 2002
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
22160
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
30576
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
5670
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
9454
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,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7461
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
5355
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
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.