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

הוסטס - פורום אחסון האתרים הגדול בישראל (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=27061)

-VladK- 23-07-06 09:52

תביא לפה את כל הקוד החדש

opsite 23-07-06 09:55

זה הקוד שמוםפיע במדריך..

<?php

mysql_connect('localhost','user','password');
mysql_select_db('news'); // החלף את השם של בסיס הנתונים בשם שאתה קבעת
$result = mysql_query("SELECT * FROM 'news' ORDER BY 'id' DESC");

// הצגת הכתבות
while ($row=mysql_fetch_array($result))
{
echo ("<table width="600" cellpadding="2" cellspacing="2 border=1"> ");
echo ("<tr> ");
echo ("<td bgcolor="gray" width="100%">" . $x['subject'] . "</td> ");
echo ("</tr> ");
echo ("<td bgcolor="white" width="100%">" . $x['content'] . "</td> ");
echo ("</tr> ");
echo ("</table> ");
echo ("<br>");
}

?>

-VladK- 23-07-06 10:02

ציטוט:

נכתב במקור על ידי Logic-serv
זה הקוד שמוםפיע במדריך..

<?php

mysql_connect('localhost','user','password');
mysql_select_db('news'); // החלף את השם של בסיס הנתונים בשם שאתה קבעת
$result = mysql_query("SELECT * FROM 'news' ORDER BY 'id' DESC");

// הצגת הכתבות
while ($row=mysql_fetch_array($result))
{
echo ("<table width="600" cellpadding="2" cellspacing="2 border=1"> ");
echo ("<tr> ");
echo ("<td bgcolor="gray" width="100%">" . $x['subject'] . "</td> ");
echo ("</tr> ");
echo ("<td bgcolor="white" width="100%">" . $x['content'] . "</td> ");
echo ("</tr> ");
echo ("</table> ");
echo ("<br>");
}

?>

לא מה שבמדריך !
הקוד שאתה עכשיו משתמש בו !

opsite 23-07-06 10:06

הנה הקוד
 
לא נורא שהפרטים גלויים :)

PHP קוד:

<?php 

mysql_connect
('localhost',logicserv_zahi,'salio'); 
mysql_select_db('news'); // &auml;&ccedil;&igrave;&oacute; &agrave;&uacute; &auml;&ugrave;&iacute; &ugrave;&igrave; &aacute;&ntilde;&eacute;&ntilde; &auml;&eth;&uacute;&aring;&eth;&eacute;&iacute; &aacute;&ugrave;&iacute; &ugrave;&agrave;&uacute;&auml; &ordm;&aacute;&ograve;&uacute; 
$result mysql_query("SELECT * FROM 'news' ORDER BY 'id' DESC") or die(mysql_error());

// &auml;&ouml;&acirc;&uacute; &auml;&euml;&uacute;&aacute;&aring;&uacute; 
while ($row=mysql_fetch_array($result)) 

    echo (
'<table width="600" cellpadding="2" cellspacing="2 border=1">'); 
    echo (
"<tr>"); 
    echo (
"<td bgcolor=\"gray\" width=\"100%\">" $x['subject'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"<td bgcolor=\"white\" width=\"100%\">" $x['content'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"</table> "); 
    echo (
"<br>"); 


?>


-VladK- 23-07-06 10:08

זהו אחי....
PHP קוד:

<?php 

mysql_connect
('localhost','logicserv_zahi','salio'); 
mysql_select_db('news'); // &auml;&ccedil;&igrave;&oacute; &agrave;&uacute; &auml;&ugrave;&iacute; &ugrave;&igrave; &aacute;&ntilde;&eacute;&ntilde; &auml;&eth;&uacute;&aring;&eth;&eacute;&iacute; &aacute;&ugrave;&iacute; &ugrave;&agrave;&uacute;&auml; &ordm;&aacute;&ograve;&uacute; 
$result mysql_query("SELECT * FROM `news` ORDER BY `id` DESC") or die(mysql_error());

// &auml;&ouml;&acirc;&uacute; &auml;&euml;&uacute;&aacute;&aring;&uacute; 
while ($row=mysql_fetch_array($result)) 

    echo (
'<table width='600' cellpadding='2' cellspacing='2' border='1'>'); 
    echo (
"<tr>"); 
    echo (
"<td bgcolor=\"gray\" width=\"100%\">" . $$row['subject'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"<td bgcolor=\"white\" width=\"100%\">" . $$row['content'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"</table> "); 
    echo (
"<br>"); 


?>

אם זה לא עובד אז אנ אידיוט גמור

opsite 23-07-06 10:11

שים לב מזה עושה..
http://www.logic-serv.co.il/1/add_news.php

-VladK- 23-07-06 10:13

PHP קוד:

<?php 

mysql_connect
('localhost','logicserv_zahi','salio'); 
mysql_select_db('news'); // &auml;&ccedil;&igrave;&oacute; &agrave;&uacute; &auml;&ugrave;&iacute; &ugrave;&igrave; &aacute;&ntilde;&eacute;&ntilde; &auml;&eth;&uacute;&aring;&eth;&eacute;&iacute; &aacute;&ugrave;&iacute; &ugrave;&agrave;&uacute;&auml; &ordm;&aacute;&ograve;&uacute; 
$result mysql_query("SELECT * FROM `news` ORDER BY `id` DESC") or die(mysql_error());

// &auml;&ouml;&acirc;&uacute; &auml;&euml;&uacute;&aacute;&aring;&uacute; 
while ($row=mysql_fetch_array($result)) 

    echo (
"<table width='600' cellpadding='2' cellspacing='2' border='1'>"); 
    echo (
"<tr>"); 
    echo (
"<td bgcolor=\"gray\" width=\"100%\">" $row['subject'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"<td bgcolor=\"white\" width=\"100%\">" $row['content'] . "</td> "); 
    echo (
"</tr> "); 
    echo (
"</table> "); 
    echo (
"<br>"); 


?>


opsite 23-07-06 10:18

זה רושם
No database selected

-VladK- 23-07-06 10:19

ציטוט:

נכתב במקור על ידי Logic-serv
זה רושם
No database selected

הטבלה news לא קיימת כנראה...

לא טבלה....המסד....

opsite 23-07-06 10:22

מה הכוונה המסד יצרתי מסד בשם logicserv_zahi


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

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