gabarab Posted July 21, 2008 Share Posted July 21, 2008 So...after 2 weeks of work, I managed to finally finish a project of mine... BUT!!! just when i thought that my problems were finished, I have noticed that only a small part of my page worked... I would post the link, to see the aftereffects of my problem, but it seems that i cannot. (yes...i read the guidelines of posting ) The short version is: The content of the front page is shown...connection to the database is made, BUT when I click on a button, or link...or anything, nothing happens... it just shows me the index page.... Did any of you encountered this problem? if so, ....HOW DID YOU FIX IT? Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/ Share on other sites More sharing options...
DarkWater Posted July 21, 2008 Share Posted July 21, 2008 You posted no code and a vague problem and expect us to magically fix it. Wow. Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595738 Share on other sites More sharing options...
trq Posted July 21, 2008 Share Posted July 21, 2008 At minimum we need to see the relevent code. I'm also not aware of anything in the guidelines prohibating posting of links unless of course its a blatent attempt at spam. Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595741 Share on other sites More sharing options...
wildteen88 Posted July 21, 2008 Share Posted July 21, 2008 It would be helpful if you posted the link, you can post links as long as you're not advertising. Posting code which relates to the problem helps too (not the whole code for your site). Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595742 Share on other sites More sharing options...
trq Posted July 21, 2008 Share Posted July 21, 2008 You posted no code and a vague problem and expect us to magically fix it. Wow. Darkwater, how about letting the mods do the moding? The OP hasn't asked anyone to fix anything, simply asked if anyone else has seen his issue. Given, we can't help much without code a simple nudge in the right is all that is required. Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595745 Share on other sites More sharing options...
gabarab Posted July 21, 2008 Author Share Posted July 21, 2008 If i would post the code, This page would be filled with 1500 lines of code...so.... On my local Apache and mysql server works perfectly. but on the site, it's not working... no login, no view messages... The website is: http://www.viralhomies.net/ Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595746 Share on other sites More sharing options...
wildteen88 Posted July 21, 2008 Share Posted July 21, 2008 First turn display_errors On and set error_reporting to E_ALL Also How are you retrieving variables set within the url in your code? eg http://www.viralhomies.net/index.php?showall=8 how is showall variables used in your page? Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595752 Share on other sites More sharing options...
DarkWater Posted July 21, 2008 Share Posted July 21, 2008 You posted no code and a vague problem and expect us to magically fix it. Wow. Darkwater, how about letting the mods do the moding? The OP hasn't asked anyone to fix anything, simply asked if anyone else has seen his issue. Given, we can't help much without code a simple nudge in the right is all that is required. I'm not trying to moderate, believe me. Just there's so much speculation that can be derived from his post with "when I click on a button, or link...or anything, nothing happens". Some code or actual demonstrations of the problem are obviously needed to diagnose anything. Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595753 Share on other sites More sharing options...
gabarab Posted July 21, 2008 Author Share Posted July 21, 2008 First turn display_errors On and set error_reporting to E_ALL Also How are you retrieving variables set within the url in your code? eg http://www.viralhomies.net/index.php?showall=8 how is showall variables used in your page? Oks...I have just been freaked out....by the number of errors on the page... about showall: if($showall) { $table=0; $query="SELECT * FROM msgs where category='$showall' order by posted"; $getmsg = mysql_query("$query"); ?> <div id="viewer"> <table border="0" cellpadding="0" height="129"> <? for ($i=0;$i<mysql_num_rows($getmsg);$i++) { $showmsg=mysql_fetch_array($getmsg); $threads=$showmsg["thread"]; $reply=mysql_query("SELECT `category` FROM `msgs` WHERE thread='$threads'"); $replies=mysql_num_rows($reply)-1; $getcateg=$showmsg["category"]; $getuser=$showmsg["userid"]; $cat=mysql_query("SELECT `name` FROM `categories` WHERE id='$getcateg'"); $category=mysql_fetch_array($cat); $usr=mysql_query("SELECT id,display,admin FROM `users` WHERE id='$getuser'"); $user=mysql_fetch_array($usr); $_date=strtotime($showmsg["posted"]); $date=date("d M Y", $_date); $time=date("h:i A", $_date); ?> <tr> <? if($getcateg!="0") { ?> <td width="125" height="18" valign="top" class="style2">Message posted in Category:</td> <td width="312" valign="top" class="style2"> <? echo $category["name"]; ?> </td> <? } else { ?> <td width="105" height="18" valign="top" class="style2" colspan="2">Message posted as reply:</td> <? } ?> </tr> <tr><td height="15" valign="top" colspan="2"> <span class="style9"><a href="index.php?viewmsg=<? echo $showmsg["thread"]; ?>&showcateg=<? echo $showmsg["category"]; ?>&table=0" target=_self> <? echo $showmsg["subject"]; ?> </a></span></td><td width="105" class="style2"><? if ($replies>0) { if ($replies==1) echo '(1 reply)'; else echo '('.$replies.' replies)'; } else echo '(No replies)'; ?></td> </tr> <tr><td valign="top" colspan="3"><div id="scrollbox"><pre><? echo $showmsg["msg"]; ?></pre></div></td></tr> <tr> <td height="18" valign="top" align="right" colspan="3"><font size="-1">Posted by:<a href="index.php?viewuserdetails=<? echo $user["id"]; ?>" target="_self"><? if($user["admin"] > 0) { if($user["admin"]=="1") echo '<font color="#0200BB">'.$user["display"]."</font></a> on <strong>".$date." ".$time."</strong>"; if($user["admin"] == "2") echo '<span style="color:#BB0000">'.$user["display"]."</span></a> on <strong>".$date." ".$time."</strong>"; if($user["admin"] == "3") echo '<strong><span style="color:#BB0000">'.$user["display"]."</span></strong></a> on <strong>".$date." ".$time."</strong>"; } else echo "<strong>".$user["display"]."</strong></a> on <strong>".$date." ".$time."</strong>"; ?> </font></td> </tr> <tr><td height="1" bgcolor="#BB0000" colspan="3"></td></tr> <? } ?> </table> </div> <? } This is the "showall" code... shows all the messages in a category.... Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595769 Share on other sites More sharing options...
trq Posted July 21, 2008 Share Posted July 21, 2008 Where is $showall defined? Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595772 Share on other sites More sharing options...
wildteen88 Posted July 21, 2008 Share Posted July 21, 2008 Just looking at your code. it replies on register_globals Your should update your code so it does not reply on this setting. Your should use superglobal variables instead ($_GET, $_POST, $_COOKIE, $_SESSION etc). register_globals has been depreciated and is disabled by default for some time. Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595776 Share on other sites More sharing options...
gabarab Posted July 21, 2008 Author Share Posted July 21, 2008 Thank you all for opening my eyes Time to redo the code... It's gonna be a looooong night... Quote Link to comment https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/#findComment-595785 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.