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

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

ddd789 05-07-07 00:01

בעיה PHP
 
שלום לכול קיהלת הוסטס
יש לי בעיה
PHP קוד:

<?php 
<form id="frm" name="frm" method="post"
<
input type="hidden" name="flag" value="enter"
<
table dir="rtl" align="center" border="0"
<
tr
<
td><font size="3" face="arial" color="#20c1e2"><b>שם: </b></font></td
<
td><input type="text" size="25" value="{$username}" name="name"></td
</
tr
<
tr
<
td><font size="3" face="arial" color="#20c1e2"><b>נושא: </b></font></td
<
td><input type="text" style="width:400px;" name="subject"></td
</
tr
<
tr
<
td><font size="3" face="arial" color="#20c1e2"><b>תוכן: </b></font></td
<
td><textarea rows="10" style="width:400px;" name="content"></textarea></td
</
tr
<
tr
<
td align="left" colspan="2"><input type="submit" value="שלחו לספר האורחים"></td
</
tr
</
table
</
form

<
table width="400" align="center" dir="rtl" style="border:solid;" 
cellspacing="1" cellpadding="4"
?>

זה הקוד הבעיה שהוא מראה לי

Parse error: syntax error, unexpected '<' in /home/daniel/domains/--./public_html/1/index.php on line 2

אם מישהוא יוכל להסביר לי איך אפשר לתקן את זה אני ישמח

ddd789 05-07-07 00:02

ויש לי עוד שאלה איך אפשר למגן על שדה שאי אפשר לערוך אותו שיוצג רק מה שאני ירשום בתוכו
תודה

opsite 05-07-07 00:02

למה בכלל לשים את זה תחת

תגי php

?>
?>

mlnn 05-07-07 00:02

הקוד המתוקן:
קוד:

<html>
<form id="frm" name="frm" method="post"> 
<input type="hidden" name="flag" value="enter"> 
<table dir="rtl" align="center" border="0"> 
<tr> 
<td><font size="3" face="arial" color="#20c1e2"><b>שם: </b></font></td> 
<td><input type="text" size="25" value="{$username}" name="name"></td> 
</tr> 
<tr> 
<td><font size="3" face="arial" color="#20c1e2"><b>נושא: </b></font></td> 
<td><input type="text" style="width:400px;" name="subject"></td> 
</tr> 
<tr> 
<td><font size="3" face="arial" color="#20c1e2"><b>תוכן: </b></font></td> 
<td><textarea rows="10" style="width:400px;" name="content"></textarea></td> 
</tr> 
<tr> 
<td align="left" colspan="2"><input type="submit" value="שלחו לספר האורחים"></td> 
</tr> 
</table> 
</form> 

<table width="400" align="center" dir="rtl" style="border:solid;" 
cellspacing="1" cellpadding="4"> 
</html>


ddd789 05-07-07 00:03

בגלל שהגדרתי
value="{$username}" משתנה

Eran-s 05-07-07 00:03

זה HTML אתה לא צריך תגי <?php ?>

ddd789 05-07-07 00:04

אבל אני רוצה להציג
ציטוט:

value="{$username}" משתנה

Eran-s 05-07-07 00:10

ציטוט:

נכתב במקור על ידי ddd789 (פרסם 514077)
אבל אני רוצה להציג

אז תרשום <?=$username?>

ddd789 05-07-07 00:20

תודה הצלחתי ועכשיו עוד שאלה איך אני יוכל למגן על השדה הזה שאי אפשר לערוך אותו?
מישהוא יוכל להסביר לי תודה

Gal Shafrir 05-07-07 00:22

תתן ל-input:
PHP קוד:

disabled "disabled" 



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

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