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

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

opsite 15-09-06 15:15

[php] בעיית " גרשיים וקוים כאלה.. כנסו בבקשה
 
אני מנסה לעשות שילחצו על כפתור מחיקה שיאל אם בטוח שברצונך למחוק..

אז אוקיי הצלחתי אבל שאני מכניס את זה ל php זה עושה לי בעיית גרשיים...

סתכלו זה השגיאה:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/zahi/domains/zahi.esg-serv.net/public_html/ex/content/view.php on line 40
או שתסכלו פה
http://www.zahi.esg-serv.net/ex/content/view.php

וזה כמובן השורה של השגיאה..
PHP קוד:

<a onclick="return confirm('אתה בטוח שבירצונך למחוק הודעה זאת?')" href="remove1.php?id='.$id.'">&#1502;חק</a> 

תודה רבה לכולם!!

RS324 15-09-06 15:16

אם עשית
echo ""

אז לפני כל " לדוגמא בתג של ה A תוסיף \

אם עשית ECHO '' אז לפני כל ' תוסיף \

opsite 15-09-06 15:22

ניסתי אחי לא טוב..

opsite 15-09-06 15:28

מצטער על ההקפצה פשוט לא הצלחתי לערוך...


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

רק שאני שם אותו בתוך קוד php זה עושה שגיאה

DorWD 15-09-06 15:49

ציטוט:

נכתב במקור על ידי Logic-serv
מצטער על ההקפצה פשוט לא הצלחתי לערוך...


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

רק שאני שם אותו בתוך קוד php זה עושה שגיאה

PHP קוד:

echo("<a onclick=\"return confirm('Hello?')\" href='www.walla.co.il'>Blat</a>"); 

תנסה ככה

opsite 15-09-06 16:10

עדיין אותו שגיאה

בניה 15-09-06 17:03

ב"ה


תביא את כל הקוד.

opsite 15-09-06 17:05

הנה אחיי
 
תדודהה הנה הקוד

PHP קוד:

<?Php
   
require "db.php";
?>
<html dir="rtl">
    <head> 
        <title>Comments</title>
    </head>
<body>
<font face="Arial" size="2">
<p align="right">
<?Php
$select_comments 
mysql_query("SELECT * FROM `text`");
    if(@
mysql_num_rows($select_comments) == 0){
       echo 
'לא נמצאו תגובות במסד הנתונים';
  }else {
     while(
$row mysql_fetch_array($select_comments)){
    
$img htmlspecialchars($row['img']);
    
$title htmlspecialchars($row['title']);
    
$content htmlspecialchars($row['content']);
    
$id htmlspecialchars($row['id']);
         echo 
'
                <table>
                                     <tr>
                              <td>
<font face="Arial" size="4" color="#000080">'
.$title.'</font></b>

                              </td>
                     </tr>

                     <tr>
                              <td>
<a href="post.php?id='
.$id.'">
<img src='
.$img.' width="144" height="109" border="0" style="border: 1px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
                              </td>
                     </tr>
                     <tr>
                              <td>
'
.$content.'                                  
<br>
<a onclick="return confirm('
אתה בטוח שבירצונך למחוק הודעה זאת?')" href="remove1.php?id='.$id.'">מחק</a>
&nbsp;&nbsp;<a href="edit.php?id='
.$id.'">ערוך</a>

                              </td>
                     </tr>
         '
;
     }
}
$id $_GET['id'];
?>
</font></b></p>

שבת שלום ומבורכת

בניה 15-09-06 17:09

ב"ה


שבת שלום גם לך!!!

PHP קוד:

<?Php
   
require "db.php";
?>
<html dir="rtl">
    <head>
        <title>Comments</title>
    </head>
<body>
<font face="Arial" size="2">
<p align="right">
<?Php
$select_comments 
mysql_query("SELECT * FROM `text`");
    if(@
mysql_num_rows($select_comments) == 0){
       echo 
'לא נמצאו תגובות במסד הנתונים';
  }else {
     while(
$row mysql_fetch_array($select_comments)){
    
$img htmlspecialchars($row['img']);
    
$title htmlspecialchars($row['title']);
    
$content htmlspecialchars($row['content']);
    
$id htmlspecialchars($row['id']);
         echo 
'
                <table>
                                     <tr>
                              <td>
<font face="Arial" size="4" color="#000080">'
.$title.'</font></b>

                              </td>
                     </tr>

                     <tr>
                              <td>
<a href="post.php?id='
.$id.'">
<img src='
.$img.' width="144" height="109" border="0" style="border: 1px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
                              </td>
                     </tr>
                     <tr>
                              <td>
'
.$content.'
<br>
<a onclick="return confirm(\'אתה בטוח שבירצונך למחוק הודעה זאת?\')" href="remove1.php?id='
.$id.'">מחק</a>
&nbsp;&nbsp;<a href="edit.php?id='
.$id.'">ערוך</a>

                              </td>
                     </tr>
         '
;
     }
}
$id $_GET['id'];
?>
</font></b></p>


Tomer 15-09-06 17:58

כל ההודעות הנחמדות על הגניבה נמחקו, Logic-Serv קיבלת אזהרה על הקפצה.


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

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