בעיה בעיברית:

bnayal

New member
בעיה בעיברית:

אני בונה פורום ומישום מה הוא שולח את הנתונים לבסיס נתונים לא בעיברית אלה בסימנים כמו זה:
ששששש&#151​
וזה יוצר לי עיוותים בטקסט, מישהו יכול להסביר לי למה? מישהו יכול להסביר לי איך לסדר זאת? הדף של ההוספה הוא כזה:
<?php include("config.php"); if (!$HTTP_COOKIE_VARS['username'] || !$HTTP_COOKIE_VARS['smartid']) { echo'<center>'; include("header.php"); echo"<br><br><b>רק משתמש רשום יכול להוסיף הודעה</b><br>"; echo'</center>'; exit; } if ($HTTP_COOKIE_VARS['username'] || $HTTP_COOKIE_VARS['smartid']) { session_start(); session_register('username'); session_register('smartid'); db_connect(); $req = "SELECT * FROM $dbtable WHERE id='$smartid'"; $res = mysql_query($req); $username = mysql_result($res,$i,"username"); $email = mysql_result($res,$i,"email"); $url = mysql_result($res,$i,"url"); $photo = mysql_result($res,$i,"photo"); $bouton = mysql_result($res,$i,"bouton"); $clicks = mysql_result($res,$i,"clicks"); $ip = mysql_result($res,$i,"ip"); $date = mysql_result($res,$i,"date_reg"); $annee = date("Y", $date); $mois = date("m", $date); $jour = date("d", $date); $heures = date("H", $date); $minutes = date("i", $date); $date = $jour."/".$mois."/".$annee; } // we need database operations require('db_connect.php'); ?> <html> <head> <title>הודעה חדשה</title> </head> <body dir="rtl"> <h2>הוסף את ההודעה:</h2> <?php $date = date("d-m-y");; $hour = date("H:i:s");; // if form has been submitted if(isset($_POST['submit'])) { // check they filled everything in. if(!$_POST['title'] | !$_POST['announcement']) { die('Please fill in all the fields.'); } // convert text new lines to HTML new lines. $_POST['announcement'] = str_replace(":)", "<img src='smilies/smile.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace(":(", "<img src='smilies/frown.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace(";)", "<img src='smilies/wink.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace(":p", "<img src='smilies/tongue.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace(":eek:", "<img src='smilies/eek.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace(":D", "<img src='smilies/biggrin.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(C)", "<img src='smilies/cool.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(M)", "<img src='smilies/mad.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(confused)", "<img src='smilies/confused.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(crazy)", "<img src='smilies/crazy.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(hmmlaugh)", "<img src='smilies/hmmlaugh.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(blink)", "<img src='smilies/blink.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(rofl)", "<img src='smilies/rofl.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(R)", "<img src='smilies/redface.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(E)", "<img src='smilies/rolleyes.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(wallbash)", "<img src='smilies/wallbash.gif'>", $_POST['announcement']); $_POST['announcement'] = str_replace("(noteeth)", "<img src='smilies/noteeth.gif'>", $_POST['announcement']); // insert into database $insert = $db->query("INSERT INTO msg (author, title, announcement, date, user_id, forum_id, hour) VALUES ('".addslashes($username)."', '".addslashes($_POST['title'])."', '".addslashes($_POST['announcement'])."', '".addslashes($date)."', '".addslashes($HTTP_COOKIE_VARS['smartid'])."', '".addslashes($forumid)."', '".addslashes($hour)."')"); echo '<p>תודה '.$username.', ההודעה שלך התקבלה, לחץ <a href="index.php?forumid='.$forumid.'"> כאן </a>על מנת לצפות בה.</p>'; } // if form hasnt been submitted else { // echo it out. echo '<form name="addmsg action="add.php?forumid='.$forumid.'" method="post">'; echo 'שמך: '.$username.'<br>'; echo 'נושא: <input type="text" name="title" maxlength="40"><br>'; echo '<textarea name="announcement" rows="20" cols="60"></textarea><br>'; echo '<input type="submit" name="submit" value="אישור"><br>'; echo '</form>'; } ?> </body> </html>​
 

bnayal

New member
כן אמרתי שזאת היתה בעיה בקידוד....

אבל תודה בכל זאת?.....
 

bnayal

New member
..:::...

זה לא הראה את הקישקושים שזה נותן לי בבסיס נתונים ( לא זוכר איך קוראים לזה ) אבל זה מעוות לי את הטקסט...
 
למעלה