שאלה דחופה אחים שלי...

ososos

New member
שאלה דחופה אחים שלי...

תראו יש לי את הקוד הבא: <?php $filename = 'yahav.txt'; $somecontent = "here the text\n"; // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($filename, 'a')) { print "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (!fwrite($handle, $somecontent)) { print "Cannot write to file ($filename)"; exit; } print "הצלחהההה !!!"; fclose($handle); } else { print "The file $filename is not writable"; } ?> שהוא עושה דבר כזה...: כשאתה נכנס לדף מעביר לקובץ טקסט את מה שרשום למעלה: here the text אבל אם אני רוצה לעשות תיבת טקסט וכפתור.. וברגע שלוחצים על הכפתור..כל מה שהם כתבו בתיבה יעבור לקובץ.... אפשר לעשות דבר כזה..??? אם כן תגידו לי איך בבקשה אני תחנןןן
 

N i X

New member
אנחנו לא אחים שלך...

ומה שאתה רוצה שנעשה בשבילך, אתה יכול לעשות לבד, תוך דקה... הנה לך משהו להתחיל איתו:
<form action="my.php" method="post"> <input type="text" name="mydata"> <input type="submit" value="Send!"> </form>​
בתוך my.php, יהיה לך את המשתנה $mydata, שאיתו תוכל לעבוד, ולעשות איתו מה שאתה רוצה...
 

ososos

New member
....

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

N i X

New member
הנה...

קוד מקור של my.php:
<? $filename = 'my.txt'; if (!isset($biatch)) { print(' <form action="my.php" method="post"> <input type="text" name="mydata"> <input type="submit" name="biatch" value="Send!"> </form>'); } else { // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($filename, 'a')) { print "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (!fwrite($handle, $mydata)) { print "Cannot write to file ($filename)"; exit; } print "Success, wrote ($somecontent) to file ($filename)"; fclose($handle); } else { print "The file $filename is not writable"; } } ?>​
 

N i X

New member
תיקון קל...

<? $filename = 'my.txt'; if (!isset($biatch)) { print(' <form action="my.php" method="post"> <input type="text" name="mydata"> <input type="submit" name="biatch" value="Send!"> </form>'); } else { // Let's make sure the file exists and is writable first. if (is_writable($filename)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($filename, 'a')) { print "Cannot open file ($filename)"; exit; } // Write $somecontent to our opened file. if (!fwrite($handle, $mydata)) { print "Cannot write to file ($filename)"; exit; } print "Success, wrote ($mydata) to file ($filename)"; fclose($handle); } else { print "The file $filename is not writable"; } } ?>​
הערה: הקוד הנ"ל לא נבדק.
 
למעלה