473,626 Members | 3,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL error stops page rendering

Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visit www.Base2WebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!

Apr 2 '07 #1
6 1961
Justin.Voelker wrote:
Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visit www.Base2WebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!
That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 2 '07 #2
On Apr 2, 1:16 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelker wrote:
Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visitwww.Base2W ebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!

That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Right now my statements are as follows:

$sql = "SELECT
ul_id,ul_userna me,ul_password, ul_admin_level, ul_login_id FROM
user_login WHERE ul_username='$v ul_username'";
$result = mysql_query($sq l) or die('Query failed: ' . mysql_error());

Could I change the "or die" part so it would display the message but
continue rendering the page?

Apr 2 '07 #3
Justin.Voelker wrote:
On Apr 2, 1:16 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>Justin.Voelk er wrote:
>>Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visitwww.Base2W ebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!
That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

Right now my statements are as follows:

$sql = "SELECT
ul_id,ul_userna me,ul_password, ul_admin_level, ul_login_id FROM
user_login WHERE ul_username='$v ul_username'";
$result = mysql_query($sq l) or die('Query failed: ' . mysql_error());

Could I change the "or die" part so it would display the message but
continue rendering the page?
It's doing exactly what you tell it to. You're telling the PHP code to
exit immediately, and it is.

You need to learn how to more gracefully handle errors. mysql_xxx calls
generally return false when they fail. You can test on this and echo an
error message.

How I wish there weren't so many bad tutorials out there!

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 2 '07 #4
On Apr 2, 2:48 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelker wrote:
On Apr 2, 1:16 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelker wrote:
Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visitwww.Base2W ebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!
That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Right now my statements are as follows:
$sql = "SELECT
ul_id,ul_userna me,ul_password, ul_admin_level, ul_login_id FROM
user_login WHERE ul_username='$v ul_username'";
$result = mysql_query($sq l) or die('Query failed: ' . mysql_error());
Could I change the "or die" part so it would display the message but
continue rendering the page?

It's doing exactly what you tell it to. You're telling the PHP code to
exit immediately, and it is.

You need to learn how to more gracefully handle errors. mysql_xxx calls
generally return false when they fail. You can test on this and echo an
error message.

How I wish there weren't so many bad tutorials out there!

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
I found a few other things to do. Now when there is no result, I call
a function which displays this sort of message...
'mysql_errno($l ink) . ": " . mysql_error($li nk);' It's user friendly
and eventually I will build in some logging that will send that info
to a database for future reference (what page they were on, date,
time, etc etc. My question to you is do you know of any other
mysql_xxx($link ) functions out there or is it just the error number
and error message?

Apr 2 '07 #5
Justin Voelker wrote:
On Apr 2, 2:48 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>Justin.Voelk er wrote:
>>On Apr 2, 1:16 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelk er wrote:
Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visitwww.Base2W ebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!
That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.
--
============ ======
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@at tglobal.net
============ ======
Right now my statements are as follows:
$sql = "SELECT
ul_id,ul_user name,ul_passwor d,ul_admin_leve l,ul_login_id FROM
user_login WHERE ul_username='$v ul_username'";
$result = mysql_query($sq l) or die('Query failed: ' . mysql_error());
Could I change the "or die" part so it would display the message but
continue rendering the page?
It's doing exactly what you tell it to. You're telling the PHP code to
exit immediately, and it is.

You need to learn how to more gracefully handle errors. mysql_xxx calls
generally return false when they fail. You can test on this and echo an
error message.

How I wish there weren't so many bad tutorials out there!

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

I found a few other things to do. Now when there is no result, I call
a function which displays this sort of message...
'mysql_errno($l ink) . ": " . mysql_error($li nk);' It's user friendly
and eventually I will build in some logging that will send that info
to a database for future reference (what page they were on, date,
time, etc etc. My question to you is do you know of any other
mysql_xxx($link ) functions out there or is it just the error number
and error message?
Nope, just error message and error number. But I've never needed
anything else, either.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 3 '07 #6
On Apr 2, 9:52 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin Voelker wrote:
On Apr 2, 2:48 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelker wrote:
On Apr 2, 1:16 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
Justin.Voelke r wrote:
Can anyone clue me on on how to have my html page continue rendering
past a MySQL error? If you visitwww.Base2W ebDesign.com, click login,
type in anything for a username and password, then view the page
source. You will see that the page displays the error then just stops
rendering the html. (I know what the error is, I deleted that table
on purpose for a simple way to show you what I would like fixed.)
This doesn't cause any problems on this particular page (other than it
fails vailidation) but I some of my website I have other information
below those errors and even the remainder of the page. If it hits an
error I would like the remainder of the page to still be displayed,
just display the error and keep moving. Is there anyway to do this?
Thank you so much for anyone that can help me out!
That depends. Why is the page stopping? A mysql error won't stop the
PHP code from running. You must be doing something to make it stop.
--
============= =====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@att global.net
============= =====
Right now my statements are as follows:
$sql = "SELECT
ul_id,ul_usern ame,ul_password ,ul_admin_level ,ul_login_id FROM
user_login WHERE ul_username='$v ul_username'";
$result = mysql_query($sq l) or die('Query failed: ' . mysql_error());
Could I change the "or die" part so it would display the message but
continue rendering the page?
It's doing exactly what you tell it to. You're telling the PHP code to
exit immediately, and it is.
You need to learn how to more gracefully handle errors. mysql_xxx calls
generally return false when they fail. You can test on this and echo an
error message.
How I wish there weren't so many bad tutorials out there!
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
I found a few other things to do. Now when there is no result, I call
a function which displays this sort of message...
'mysql_errno($l ink) . ": " . mysql_error($li nk);' It's user friendly
and eventually I will build in some logging that will send that info
to a database for future reference (what page they were on, date,
time, etc etc. My question to you is do you know of any other
mysql_xxx($link ) functions out there or is it just the error number
and error message?

Nope, just error message and error number. But I've never needed
anything else, either.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Thanks for all of your help Jerry. I noticed your name on quite a few
of my posts recently and I want to thank you for all of the wonderful
help and great answers.

Apr 3 '07 #7

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

Similar topics

0
1399
by: Ashish Gupta | last post by:
Dear Mysql-help, I am new to mysql server and trying to install the mysql server on my windows xp home edition. I have downloaded 4.0.14 zip file on my computer. I can unzip the file and it generates 10-15 files. When I do double click on the setup.exe it loads for 5 seconds and then stops. No window is displayed. No error message is generated. I thought may be I should try some other version. I downloaded older version 4.0.13 and same...
21
1785
by: Eugene | last post by:
Hi.... I have a little javascript popup box that people click on to open up an information panel. I made some little blinking star anims on the page that stop blinking after the popup has been activated - and stay "off" even after the popup is closed. any fix for this?
4
2105
by: Jeff S | last post by:
To make a long story short, let me say I had MySQL working on Windows 98 and everything was fine. Well, I took the big leap and removed all traces of Windows and Microsoft from the computer. (hooray!) Once I had Linux running OK, I downloaded and installed MySQL using an RPM package. I guess the server is running (it says it is every time the computer starts and it stops successfully every time the computer shuts down) however, I cannot...
6
1799
by: MBS | last post by:
Yeah, read the previous posts...I did that. None answer my question. I just installed PHP 5.0.4, Apache 2.0.54, and MySQL 4.1.13 a few days ago on WinXP SP2. My goal is to learn to use these programs. I cannot, absolutely cannot connect to MySQL using PHP. I've tried everything possible including the mysqli functions. I have no idea what is wrong. I don't get any error messages at all. It's almost as if PHP stops processing the...
6
4592
by: José Joye | last post by:
Hello, I'm currently reading the MS Developing Web applications with c# (and VB.net). In the chapter related to Error management, there is a sample about "Page-Level Error Pages" eg: In my form: ========
1
3368
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
4
5358
by: Richard | last post by:
Hi All, I've been trying to build a Ruby-on-Rails plus MySQL application. I'm running Ruby 1.8.2, Rails 1.1.4 and MySQL 5.0.15-nt over WinXP-Pro/SP2. I run under an Administrative account. I tried building the first example from Agile Web Development with Rails, 1st ed. Somehow the DB got corrupted and I couldn't recover. Instead of retrying that, I tried building the first example from Ruby For Rails, which worked fine.
7
5393
by: eholz1 | last post by:
Hello Group, Perhaps you can help me. I have a mysql db, that holds images. Images are encoded using base64_decode/encode, etc. Image data seems fine. I have a view.php page that is supposed to show the image, and an image.php page that accesses the database, retrives the image data, and then (theoretically) prints the decoded data to the page. below is the view.php page code: problem area the img tag src no
10
2028
by: DavidPr | last post by:
I'm having a problem putting entries into a table. I have a job board and I want to prevent certain companies from being able to register - again. I don't allow certain type ads, so when they register the first time and I delete them they just re-register and this process goes on and on and on. I put a piece of code into the registration form that checks to see if if this company is in a list and if so a message is returned saying...
0
8269
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
8203
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
8512
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...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
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
5576
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
4094
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
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.