ShanesProjects
-
Posts
21 -
Joined
-
Last visited
Never
Posts posted by ShanesProjects
-
-
Fixed it had to be ORDER BY id ACS. Not ORDER BY id DESC.
-
What do I do to my code to make it show the last one row entered?
[code]<?
include("MySQL_Info.php");
$sql="SELECT * FROM users ORDER BY id DESC";
$mysql_result=mysql_query($sql);
$num_rows=mysql_num_rows($mysql_result);
while ($row=mysql_fetch_array($mysql_result))
{
$Username=$row["Username"];
$Title=$row["Title"];
}
echo "<center><font color='#C0C0C0'>-Newest User-</font><br /><a href='View_Profile.php?Username=$Username'>$Username</a><br /><font color='Black'>$Title</font></center>";
?> [/code] -
I fixed it.
-
Thanks for trying I'll try somethings.
-
I use IE. That may be why but I want it to work for IE to.
-
What browser are you using? Sorry for the late reply had to do something.
-
Ok, the codes I posted 2 replys above are correct now you can compare.
-
OMG I replaced the news code with the comment code. Now I got to remake that comment table. I'll reply when the codes above are correct.
-
News.php
[code]$News=$row["News"];
$News2 = wordwrap($News, 80, "<br/>\n");
$sql = mysql_query("SELECT * FROM news_comment WHERE Title = '$Title'");
$CommentCount = mysql_num_rows($sql);
echo"<center><table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='500'>
<tr>
<td width='100%' align='center' bgcolor='#808080'>
<p style='margin-top: 0; margin-bottom: 0'><font color='#C0C0C0'>Title:</font> <font color='Black'>$Title
</font>
<p style='margin-top: 0; margin-bottom: 0'><font color='#C0C0C0'>Date:</font> <font color='Black'>$Date_Added</font><br />
<font size='1'><a href='Add_News_Comment.php?Title=$Title'>Add A Comment</a></font>/<font size='1'><a href='View_News_Comments.php?Title=$Title'>View Comments(</font><font size='1' color='Red'>$CommentCount</font><font size='1'>)</font></a></td>
</tr>
<tr>
<td width='100%' align='center' bgcolor='#C0C0C0' bordercolor='#000000'><font color='Blue'>$News2</font></td>
</tr>
</table></center>
<br />";[/code]
View_News_Comments.php
[code]$Comment=$row["Comment"];
$Comment2 = wordwrap($Comment, 40, "<br />\n");
echo"<center><table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='500'>
<tr>
<td width='1000' align='center' bgcolor='#808080'>
<p style='margin-top: 0; margin-bottom: 0'><font color='#C0C0C0'>Posted by:</font> <a href='mailto:$E_Mail'>$First_Name</a>
</td>
</tr>
<tr>
<td width='1000' align='center' bgcolor='#C0C0C0' bordercolor='#000000'><font color='Blue'>$Comment2</font></td>
</tr>
</table></center>
<br />";[/code] -
Ok, I will in a few minutes.
-
No, but I don't understand why the news page wordwraps and the news comments don't.
-
Why don't it word wrap it?
[code]
$Comment2 = wordwrap($Comment, 40, "<br />\n");
echo"<center><table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='35%' height='100'>
<tr>
<td width='100%' height='18' bgcolor='#808080'>
<p align='center'>Posted by: <font color='Black'><a href='mailto:$EMail'>$First_Name</a></font></td>
</tr>
<tr>
<td width='100%' height='81' bgcolor='#C0C0C0' align='left' valign='top'>
<p align='center'>$Comment2</td>
[/code] -
Its Fixed.
-
How do I make my code make the $Message3 seen as HTML.
[code]
//Part One
$Header = "$Subject: Sent By $EMail";
$Message2 = wordwrap($Message, 40, "<br />\n");
$Message3 = "<center>Name: $FirstName $LastName</center>
<center>Message: $Message2</center><br /><br /><br />
<center><a href='Admin_Ban_From_E_Mail.php?IP=$Ip'>Ban This Ip: $Ip</a></center>";
//Part Two
mail($Send_To, $Subject, $Header, $Message3);
[/code] -
Found the problem.
-
Should this work?
[code]$sql4 = mysql_query("SELECT * FROM guild_promote_check WHERE Username='$Member_Username' And Date='$Short_Date'");
$result4 = mysql_num_rows($sql4);[/code] -
Fixed it! Changed it to int. Thanks anyways.
-
What can I change it to for it to work?
-
Its varchar(250).
-
I got 4 users and there ranks are 1, 2, 3, and 14. Why dose this show it User1-User14-User2-User3 instead of User1-User2-User3-User14?
[code]$sql3="SELECT * FROM guild_members WHERE Disabled='0' ORDER BY Rank DESC";[/code]
My Portfolio Site
in Website Critique
Posted
What do you think?