הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   בעיה בקוד קצת עזרה תודה (https://hosts.co.il/forums/showthread.php?t=9626)

חבר13 15-12-05 17:08

בעיה בקוד קצת עזרה תודה
 
קוד:

<?
include "panel/config.php";
$searchwords = $_GET['sw'];

$resarcc = mysql_query("SELECT * FROM users WHERE username like '%$searchwords%' OR icq like '%$searchwords%'");

while(@($r=mysql_fetch_array($resarcc))) {
$username=$r["username"];
$id=$r["id"];
$email=$r["email"];
$location=$r["location"];
$icq=$r["icq"];

echo"
<table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='65%'>
  <tr>
    <td width='20%'>
    <p align='center'>$username</td>
    <td width='80%'><font face='Arial'>
    <b>
<span style='font-size: 9pt'><span class='style1'>Email</span>:<a href='mailto:$email'>$email</a></span></b></font><font face='Arial' color='#1875E7'>
        <br>
</font><font face='Arial'><span style='font-size: 8pt'><span class='style2'>ICQ</span></span></font><font face='Arial' color='#1875E7'><span style='font-size: 8pt'><font color='#808080'>:$icq</font></span><br>
</font><font face='Arial'><span class='style5'>location:$location</span></font></td>
  </tr>
</table>
<hr style='COLOR: #9cb8d0' SIZE='1'><br>
";
}
?>
<form action='search.php' method='get' dir='rtl'>
<TABLE align=right style='width:100%;' height='8'>
  <tr>
    <TD dir=rtl height='1' width='13%'>
  <b><font face='arial' size='2'><span lang='he'>find user</span>: </font></b>
  </TD><TD dir=rtl height='1'>
  <input id='qr_quickreply' tabIndex='4' name='sw' value='<?=$searchwords?>' size='26' style='float: right'>
  <INPUT type=submit value=Goooo!></TD>
  </tr>
  </TABLE>
</FORM>

מה הבעיה פה חח
זה לא מציג לי שום שגיאה זה פשוט לא מחפש לי את המשתמשים

Eran-s 15-12-05 17:19

תוריד מה-mysql_fetch_array את ה-@ לבדוק אם מתקבלת שגיאה קודם כל

חבר13 15-12-05 17:23

כן אחי שגיאה בשורה 7
זה השורה
קוד:

while($r=mysql_fetch_array($resarcc)) {

Eran-s 15-12-05 17:24

תצטרך לתת את כל השגיאה ותשים or die(mysql_error()) בשאילתה ותביא את השגיאה...

חבר13 15-12-05 17:29

זה השגיאה

קוד:

Parse error: parse error, unexpected T_LOGICAL_OR in /home/miro/domains/miro..net/public_html/hagiga/search.php on line 7
וזה השורה
קוד:

while($r=mysql_fetch_array($resarcc))or die(mysql_error()) {
ולא עובד:qqb008:

Eran-s 15-12-05 17:34

אמרתי שתשים בשאילתה את ה or die...

Espire 15-12-05 18:59

הוא שם

Eran-s 15-12-05 19:02

נו גם אתה קשה הבנה? בשאילתה!!! לא בלולאה!

psycho 15-12-05 22:18

אני לא מבין למה הבן אדם לא קורא את הארור.
רשום לך בפירוט אולי באנגלית אבל מילה במילה ועוד באיזו שורה הבעיה

ארר..


כל הזמנים הם GMT +2. הזמן כעת הוא 10:22.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ