Current location: Hot Scripts Forums » Programming Languages » PHP » blank screen?


blank screen?

Reply
  #1 (permalink)  
Old 11-15-03, 01:57 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
blank screen?

well finally my program is done but, when i went to it only the main menu page showed. everything else displayed a blank screen. if you have any idea to what the problem is plz reply or email me thx.
Reply With Quote
  #2 (permalink)  
Old 11-15-03, 03:13 PM
Chroder Chroder is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Toronto, Ontario
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
It could be lots of things, are you using any output buffering? How about some code?
__________________
DevBox.net | DevBoxForums.com
Reply With Quote
  #3 (permalink)  
Old 11-15-03, 03:22 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well how much code do u want? and no i dont believe im using any buffering.
Reply With Quote
  #4 (permalink)  
Old 11-15-03, 08:55 PM
Chroder Chroder is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Toronto, Ontario
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
It could be so many things, so try to narrow things down. If you have NuSphere's phpEd, you can use the breakpoint feature to make PHP execute up to sepcific points. You can start at the beginning and keep going up a little bit until something happens (or stops happening).

Mabe something a little easier, try changing your error reporting. Stick this at the top of your script:

Code:
error_reporting(E_ALL);
__________________
DevBox.net | DevBoxForums.com
Reply With Quote
  #5 (permalink)  
Old 11-15-03, 09:02 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
ok so add that code to the top and it should tell me the problem?

but i think i know the problem, but does it matter how the program is written? like the i have it is like this:

menu
process add
add menu
process edit
edit menu
process delete
delete menu
process list
list menu

if thats the reason why the blank screen appear plz tell me and tel me how it should be.but i think thats the reason but not a 100% sure
Reply With Quote
  #6 (permalink)  
Old 11-16-03, 07:51 AM
optix's Avatar
optix optix is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
You could just post maybe the first 30 or so lines of code. If you're getting a totally blank page the error is mor ethan likely at the beginning of your script. Also try viewing the source of the generated empty page. SOmetimes there will be a little bit of HTML in there that can give you some clue as to where your script died.
__________________
[B] ModernConspiracy.com - Conspiracy Theory Forums (Talk Conspiracy)
DIYAutoForum.com - DIY Auto Forum
Reply With Quote
  #7 (permalink)  
Old 11-16-03, 08:39 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
ok well i was thinking its because of how i set-up the script but im not sure. because the menu works just fine but the rest doesnt which sends me a small idea that something isnt set-up in the right order.
Reply With Quote
  #8 (permalink)  
Old 11-16-03, 09:53 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
alright heres the line of code for a chunk of my script:

PHP Code:

if ($action == 'addurl')

{
if (
$submit == "Add URL"){
  
// The submit button was clicked!
include ("$path/config.php");

$db_connection mysql_connect ($DB_HOST$DB_USER$DB_PASS);
  if (
$db_connection == false){
    echo 
mysql_errno().": ".mysql_error()."<BR>";
    exit;
  }   
if (
$search == "Artist")
{
  
$query "insert into SSearch_Artist (Name, Description, Address, Keywords) values ('$name', '$description', '$url', '$keyword')";
  
$result mysql_db_query ($DB_NAME$query);
  if (
$result){
    echo 
"Success! <A HREF=\"admin.php?action=menu\">click here</A> to go to main menu.";

  }
  else{
    echo 
mysql_errno().": ".mysql_error()."<BR>";
  }

  
mysql_close ();
}
if (
$search == "Lyrics")
{
  
$query "insert into SSearch_Lyric values (Name, Description, Address, Keywords) values ('$name', '$description', '$url', '$keyword')";
  
$result mysql_db_query ($DB_NAME$query);
  if (
$result){
    echo 
"Success! <A HREF=\"admin.php?action=menu\">click here</A> to go to main menu.";

  }
  else{
    echo 
mysql_errno().": ".mysql_error()."<BR>";
  }

  
mysql_close ();
}
if (
$search == "Photos")
{
  
$query "insert into SSearch_Photo values (Name, Description, Address, Keywords) values ('$name', '$description', '$url', '$keyword')";
  
$result mysql_db_query ($DB_NAME$query);
  if (
$result){
    echo 
"Success! <A HREF=\"admin.php?action=menu\">click here</A> to go to main menu.";

  }
  else{
    echo 
mysql_errno().": ".mysql_error()."<BR>";
  }

  
mysql_close ();
}
if (
$action =='add')
{
echo 
"<HTML>\n";
echo 
"<HEAD>\n";
echo 
"<TITLE>Admin Panel-Add URL</TITLE>\n";
echo 
"</HEAD>\n";
echo 
"<BODY BGCOLOR=\"#000000\" TEXT=\"#FFFFFF\" LINK=\"#66CCFF\">\n";
echo 
"<FONT FACE=\"Verdana\" SIZE=\"3\">\n";
echo 
"<CENTER><A HREF=\"admin.php?action=menu\">Back to Menu</A><BR><BR></CENTER>\n";

echo 
"Choose a catagory below to add an item into the database.<BR><BR>\n";

echo 
"<form method=\"post\" action=\"admin.php?action=addurl\">\n";
echo 
"Page Name:<input type=\"text\" name=\"name\">\n";
echo 
"<br>Description:<input type=\"text\" name=\"description\">\n";
echo 
"<br>Address:<input type=\"text\" name=\"url\" />\n";
echo 
"<br>Keyword(s):<input type=\"text\" name=\"keyword\" size=\"50\">\n";
echo 
"<br>Search Option:<BR>\n";
echo 
"<input type=\"radio\" name=\"search\" value=\"Artist\" checked>Artist\n";
echo 
"<input type=\"radio\" name=\"search\" value=\"Lyrics\">Lyrics\n";
echo 
"<input type=\"radio\" name=\"search\" value=\"Photos\">Photos\n";

echo 
"<br><input type=\"submit\" value=\"Add URL\">\n";
echo 
"</form>\n";
echo 
"</BODY>\n";
echo 
"</HTML>";
}
}

hope you can help now. this should be enough since the rest of my script is basically the same.
Reply With Quote
  #9 (permalink)  
Old 11-16-03, 01:12 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Blank Screens are EVIL ..
it happened to me twice and I just couldn't figure out what is the problem and I had to re-write the whole file again from scratch , after this stupid thing the file works fine ... and you could imagine how tough it was becuase the file I was working on was a profile edit page !!
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #10 (permalink)  
Old 11-16-03, 04:15 PM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
well i hope that wont be the case 4 me but can you draw nething from my code i showed above? really dont want to re-write my code since it took me this far to here.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen Resolution Poll webscript Polls 18 09-27-03 05:31 PM
field of db access whit a blank sal21 ASP 2 07-07-03 11:40 AM


All times are GMT -5. The time now is 05:46 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.