Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Pomoc potrebna (nepozeljni karakter)

[es] :: PHP :: Pomoc potrebna (nepozeljni karakter)
(Zaključana tema (lock), by Nemanja Avramović)

[ Pregleda: 2755 | Odgovora: 4 ] > FB > Twit

Postavi temu

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

varginjo
Atila Varga
Čoka

Član broj: 25671
Poruke: 258
*.pyrotherm.co.yu.

Sajt: rs.linkedin.com/in/atilav..


+1 Profil

icon Pomoc potrebna (nepozeljni karakter)02.11.2007. u 06:24 - pre 200 meseci
Na ovom linku se nalazi kontakt forma http://varginjo.awardspace.com/formTest/test.html
E sada pojave se ona 2 viska karaktera , kako to da uklonim ?

Ovo je php kod.


Code:
<?php
$nasaadresa = "[email protected]";  //please replace this with your address

$mail = $_POST['Email'];
$porukaa = $_POST['Message'];
$poruka = str_replace("\r", '<br />', $porukaa);
//START OF THANKS MESSAGE
//you may edit $thanks message. this is a message which displays when user sends mail from your site
$thanks = "
<p align='left'><br>
<b>Your message has sucessfuly been sent!<br><br><br></b>
 MESSAGE TEXT 
<br><br>
$poruka
<br><br>
 END OF MESSAGE 
<br><br><br>
You will recive a copy of the message at your email address <b>($mail).<br>We will reply you soon as possible<br></b></p>";
//do not edit nothing below this line  until comment (ME) say so if you don't have skills with PHP
//END OF THANKS MESSAGE

if($_POST['submitform']) 
{

    $Name = $_POST['Name'];
    $Email = $_POST['Email'];
    $Message = $_POST['Message'];
    $require = $_POST['require'];
    $browser = $HTTP_USER_AGENT;
    $ip = $_SERVER['REMOTE_ADDR'];

    $dcheck = explode(",",$require);
    while(list($check) = each($dcheck)) 
    {
        if(!$$dcheck[$check]) {
        $error .= "You have not filled this filed(s): <b>$dcheck[$check]</b>.<br>";
        }
    }
    if ((!ereg(".+\@.+\..+", $Email)) || (!ereg("^[[email protected]]+$", $Email))){
    $error .= "Wrong e-mail.<br>This e-mail address <b>$Email</b> - is not valid. Please enter correct e-mail address.";
    }
    if($error)
    {
    echo $error;
    echo '<br><a href="#" onClick="history.go(-1)">Please try again.</a>';
    }
    else
    {
//START OF INCOMING MESSAGE (this message goes to your inbox)
$message = "
Name: $Name:
E-mail: $Email

Message: $Message

-----------------------------
Browser: $browser
IP: $ip
";
//END OF INCOMING MESSAGE (this message goes to your inbox)

$subject = "Message from your  - Message was sent by $Name"; //subject OF YOUR INBOX MESSAGE sent to you

$subject2 = "You have succesfully sent message from !"; //subject of OUTGOING MESSAGE - edit this
//OUTGOING MESSAGE TEXT
$message2 = "You have sent a message to site admin of a :
-----------------------------
From: $Name:
E-mail: $Email
    
Message: $Message

-----------------------------
";
//END OF outgoing MESSAGE


mail($nasaadresa,"$subject","$message","From: $Name <$Email>");
mail($Email,"$subject2","$message2","From: <$nasaadresa>");
echo "$thanks";
    }
}
else{
//this is contact form down here, please edit if you know what are you doing... or the contact form may not be working.
echo '

<form name="contactform" action="'.$PHP_SELF.'" method="post">
<input type="hidden" name="require" value="Name,Email,Message">
  <table width="444" align="center">
    <tr>
      <td colspan="2" align="center">
        <p></td>
    </tr>
    <tr>
      <td valign="top" align="right"><b>Name:</b></td>
      <td valign="top">
        <input name="Name" size="30" >
      </td>
    </tr>
    <tr>
      <td valign="top" align="right"><b>E-mail:</b></td>
      <td valign="top">
        <input name="Email" size="30">
      </td>
    </tr>
    <tr>
      <td valign="top" align="right"><b>Message:</b></td>
      <td valign="top">
        <textarea name="Message" rows="10" cols="30"></textarea>
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center"><p align="center"><br>
        <input type="submit" value="Send" name="submitform">
        <input type="reset" value="Reset" name="reset"></p>
      </td>
    </tr>
  </table>
</form>';
}
?>


Hvala
 
0

Aleksandar Ružičić
Software Architect, Appricot d.o.o.
Beograd

Član broj: 26939
Poruke: 2881

Jabber: krckoorascic@gmail.com
Sajt: krcko.net


+44 Profil

icon Re: Pomoc potrebna (nepozeljni karakter)02.11.2007. u 09:59 - pre 200 meseci
sacuvaj fajl kao utf-8 (ako u browseru izaberes View/Encoding/Unicode videces da ti karakteri nestaju)
 
0

varginjo
Atila Varga
Čoka

Član broj: 25671
Poruke: 258
*.pyrotherm.co.yu.

Sajt: rs.linkedin.com/in/atilav..


+1 Profil

icon Re: Pomoc potrebna (nepozeljni karakter)02.11.2007. u 12:51 - pre 200 meseci
Sasa,hvala ti puno :) to je bio problem .

Pozdrav
 
0

1r0nM4n
Nenad Vasić
Web Developer
Beograd

Član broj: 55970
Poruke: 441
*.ikomline.net.

ICQ: 303614173
Sajt: www.nenadvasic.com


+1 Profil

icon Re: Pomoc potrebna (nepozeljni karakter)02.11.2007. u 15:43 - pre 200 meseci
To se zove BOM ili ti Byte-order mark.
Nije samo dovoljno da se fajl sačuva kao UTF-8. Potrebno je dodati i odgovarajući meta tag:
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Preporučio bih ti da izbrišeš taj BOM iz svih fajlova jer možeš imati problema sa sesijama, "kolačićima", itd.. To se može izbrisati starim programom edit koji se i dalje nalazi u sastavu windowsa. Otvoriš "Run" i kucaš "edit". Videćeš na početku fajla te neke karaktere koji predstavljaju BOM. Ali lakše ti je da koristiš neki editor koji ima opciju formatiranja fajla kao UTF-8 ali bez BOM-a. Znam da to ima Notepad++.

p0z
 
0

Nemanja Avramović
Engineering Manager
MENU Technologies
Beograd, Srbija

Moderator
Član broj: 32202
Poruke: 4391
212.200.213.*

Sajt: https://avramovic.info


+46 Profil

icon Re: Pomoc potrebna (nepozeljni karakter)02.11.2007. u 18:49 - pre 200 meseci
Sve to ti je objašnjeno u topovanoj temi PHP FAQ!
Laravel Srbija.

[NE PRUŽAM PODRŠKU ZA PHP PREKO PRIVATNIH PORUKA!]
 
0

[es] :: PHP :: Pomoc potrebna (nepozeljni karakter)
(Zaključana tema (lock), by Nemanja Avramović)

[ Pregleda: 2755 | Odgovora: 4 ] > FB > Twit

Postavi temu

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.