-
MySQL Error
Hi, Thank you for your time and initiative to try to published the scripts. I have seen the site. BUT it's totally not working. I think you don't even add the database, cuz its looks like there are no data at all. Please have a look at the english version here: www.rodzi.net/i I upload again the new script (in full). To enter the admin you must go to the "editor" folder and login as rodzi:rodzi61 Thanks. i.zip
-
MySQL Error
Hi, Thank you for your time and initiative to try to published the scripts. I have seen the site. BUT it's totally not working. I think you don't even add the database, cuz its looks like there are no data at all.
-
MySQL Error
Thanks for ur advice, The connection is ok. 100% sure. The other pages (I mean the listing pages) is working except the article content pages. I have included the dumping data in the zip files.
-
MySQL Error
Hi everyone, I really need help to solve the problem. Please download the entire script for your reference. Thanks. artnews.zip
-
MySQL Error
Hi everyone, Like what Thomas and BenG reccommended, I apply it now. Here is the code: <? if (isset($_GET['a_id'])) { $aa=mysql_real_escape_string($_GET['a_id']); $result1 = mysql_query("SELECT * FROM articles WHERE a_id ='$a_id'") or die( mysql_error() ); $b=0; $num=mysql_num_rows($result1); while($row=mysql_fetch_object($result1)) {$b++; $a_id=$row->a_id; $a_title=$row->a_title; $a_pdf=$row->a_pdf; $a_date=strtotime($row->a_date); $a_link=$row->a_link; $a_desc=$row->a_desc; $a_ldesc=$row->a_ldesc; } }; ?> BUT STILL I got the blank page! What really confused me is that it's working at my local server (NOT WORKING only at online server. Both servers has the same version of MySQL and PHP and Apache.
-
MySQL Error
I have counted several times, there are on '{' and one '}'. But at the bottom of the code there are one code which contain the following: <!--<? }?>--> AND NOW I HAVE IMPLEMENTED YOUR RECOMMENDATION. THE NEW CODE NOW IS AS BELOW: <? if (isset($_GET['a_id'])) { $aa=mysql_real_escape_string($_GET['a_id']); $result1 = mysql_query("SELECT * FROM artikel WHERE a_id ='$a_id'") or die( mysql_error() ); $b=0; $num=mysql_num_rows($result1); while($row=mysql_fetch_object($result1)) {$b++; $a_id=$row->a_id; $a_title=$row->a_title; $a_pdf=$row->a_pdf; $a_date=strtotime($row->a_date); $a_link=$row->a_link; $a_desc=$row->a_desc; $a_ldesc=$row->a_ldesc; } ?> NOW I GET A BLANK PAGE. Please help me again. Thanks.
-
MySQL Error
Thanks a lot guys for your help. A few minutes ago I implement one of your recommendations as in the following code. Let me put it in full: <? include("connection.php");?> <HTML> <HEAD> <TITLE>iSyarikat.com | Jendela Syarikat | Artikel</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK href="gaya.css" type=text/css rel=stylesheet> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <div align="center"> <TABLE WIDTH=720 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD COLSPAN=5> <IMG SRC="imej/in_01.gif" WIDTH=720 HEIGHT=20 ALT=""></TD> </TR> <TR> <TD COLSPAN=7 ALIGN=left VALIGN=top> <map name="PetaMenu"> <area href="index.php" shape="rect" coords="42, 0, 155, 42"> </map> <IMG SRC="imej/atas2.gif" WIDTH=720 HEIGHT=44 BORDER="0" ALT="Kembali ke Laman Utama" usemap="#PetaMenu"></TD> </TR> <TR> <TD ALIGN=left VALIGN=top background="imej/in_03.gif" WIDTH=15></TD> <TD ALIGN=left VALIGN=top background="imej/in_04.gif" WIDTH=183></TD> <TD ALIGN=left VALIGN=top background="imej/in_05.gif" WIDTH=20></TD> <TD ALIGN=left VALIGN=top background="imej/in_06.gif" WIDTH=487><div align="center"><table width=90%><tr><td><img src=imej/pojok.gif></td></tr><tr><td height=10></td></tr> <tr><td class=teks><!--Kandungan artikel di sini---><? if (isset($_GET['a_id'])) { //$aa=$_GET['a_id']; //$result1 = mysql_query("SELECT * FROM artikel_articles where a_id=$a_id"); $aa=mysql_real_escape_string($_GET['a_id']); $result1 = mysql_query("SELECT * FROM artikel_articles WHERE a_id = ".$a_id.") or die( mysql_error() ); $b=0; $num=mysql_num_rows($result1); while($row=mysql_fetch_object($result1)) {$b++; $a_id=$row->a_id; $a_title=$row->a_title; $a_pdf=$row->a_pdf; $a_date=strtotime($row->a_date); $a_link=$row->a_link; $a_desc=$row->a_desc; $a_ldesc=$row->a_ldesc; } ?> <p class="tajuk"><?=$a_title?></p> <p class="teks"> <?=$a_desc?> <br> <br> <? }?> </p></td></tr></table></div></TD> <TD ALIGN=left VALIGN=top background="imej/in_07.gif" WIDTH=15></TD> </TR> <TR> <TD COLSPAN=5 ALIGN=left VALIGN=top> <IMG SRC="imej/in_08.gif" WIDTH=720 HEIGHT=25 ALT=""></TD> </TR> </TABLE> </div> </BODY> </HTML> And now I get the following error: Parse error: syntax error, unexpected T_INC, expecting '}' in /home/rodzi/domains/isyarikat.com/public_html/artikel.php on line 36 Please help me again. Thanks.
-
MySQL Error
Thanks for your reply. But I dont understand what you mean when you said: . Here is the full code: <? if (isset($_GET['a_id'])) { $aa=$_GET['a_id']; $result1 = mysql_query("SELECT * FROM artikel_articles where a_id=$a_id"); $b=0; $num=mysql_num_rows($result1); while($row=mysql_fetch_object($result1)) {$b++; $a_id=$row->a_id; $a_title=$row->a_title; $a_pdf=$row->a_pdf; $a_date=strtotime($row->a_date); $a_link=$row->a_link; $a_desc=$row->a_desc; $a_ldesc=$row->a_ldesc; } ?> <p class="tajuk"><?=$a_title?></p> <p class="teks"> <?=$a_desc?> <br> <br> <? }?> The above code is to display full article content.
-
MySQL Error
Hi, I keep getting the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/rodzi/domains/isyarikat.com/public_html/artikel.php on line 32 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/rodzi/domains/isyarikat.com/public_html/artikel.php on line 33 The relevant code is: line 32 and 33 in artikel.php: $num=mysql_num_rows($result1); while($row=mysql_fetch_object($result1)) I did not get the error in my local machine (localhost), but i get that error when i load the page in the online server. Can Someone please help me?