הודעת שגיאה.

madg

New member
הודעת שגיאה.

Notice: Undefined variable: card in C:\Inetpub\wwwroot\Personal\forum.php\header.php on line 62 מה זה אומר ? שהרי לא חייבים להצהיר על משתנה מראש, נכון ? תודה מראש, גיא
 

madg

New member
מילת הסבר.

אני מנסה לשלוח לאותו עמוד משתנה בשם card שיכיל שם של שכבה, לפי השם של השיכבה אני רוצה ל"העלים" או ל"הראות" חלקים שונים בעמוד.
<?php $card?>​
וזה מיצר לי את ההודעת שגיאה. מישהו ? תודה.
 

behemot

New member
לא עשית השמה אם רצית לשנות לו

ערך ושכחת "=" אם רצית להדפיס אותו
 

madg

New member
לא הבנתי את ההסבר.

אולי אפשר לצרף דוגמית ? תודה.
 

dando

New member
ככה

<? // inserting value $card="somthing"; //printing value of variable echo $card​
 

madg

New member
תודה אבל זה לא מה שאני צריך.

אני מחפש משהו יותר בסגנון של ..
$somevar = "somename" // bla bla bla if ($somevar == "a_name") { // bla bla } ובעצם נתתי לי רעיון .... ! תודה. ( זה לדעתי ניקרא "הפרית (מבחנה) חיצונית"
 

madg

New member
הנה הבעיה

יש לי את זה, ובמקום לקבל את הערך של המשתנה אני מקבל את ההודעת שגיאה ההיא מהתחלת השירשור. אין פה איזה תותח שיכול להעלות אותי על הדרך הנכונה ? בבקשה ?
<form name="main"> <input type="text" name="divname" value="<?php echo $_POST[´card´];?>"> </form> <script language="javascript"> function checkvid() { if (document.main.divname.value == "") document.main.divname.value = "main" }​
 

matroz

New member
error notification

what you have is not an error but a notice. the notice you get is that you are using a variable which you did not decalre var $var; there is no problems with notices but you may want to change it. you can do it in the following ways: 1. put error_reporting (E_ALL ^ E_NOTICE); at the begining of your code 2. change the setting for error reporting in your php.ini file. my guess is that you are using a microsoft version of php, where the error reporting is set by default to E_ALL . change it to : E_ALL ^ E_NOTICE matty
 

madg

New member
כן תודה

כבר עליתי על זה לבד. שיניתי ב קובץ INI. גיא.
 
למעלה