Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/115872-solved-where-did-i-go-wrong/
Share on other sites

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.

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?

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.

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....

 

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.