Php script werkt niet

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Pagina: 1 2 3 volgende »

Mads kroes

mads kroes

11/01/2010 21:49:00
Quote Anchor link
hallo,
ik heb dit als html

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<center>
<form action="/contact.php">
Naam:<br>
<input name="naam" type="text" id="naam">
<br><br>
e-mailadres:<br>
<input name="mail" type="text" id="mail">
<br><br>
onderwerp:<br>
<input name="ond" type="text" id="ond">  
<br>
<br>
Bericht:<br>
<textarea name="bericht" cols="40" rows="5" id="berichtl">
</textarea>

<input type="submit" name="Submit" value="Verzenden">
<input type="reset" name="Submit2" value="Wissen">
 
</form>
</center>


en dit als php
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
    1.    <?
    2
.    
    3.    $recipient=("[email protected]");
    4.    $subject="contact";
    5.    
    7.    
    8.    $content=
    9.    "Voornaam:".$naam.
    10.    "
    11.    mail:"
.$mail.
    12.    "  
    15.    onderwerp:"
.$ond.

    "
    bericht:"
.$bericht.
    
    17.    $message;
    18.    
    19.    mail($recipient, $subject, $content);
    20.    
    21.    echo "Uw mail is met succes verstuurd!";
    22.    ?>


ik krijg deze fout
Parse error: syntax error, unexpected T_STRING in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/contact.php on line 2
wat doe ik verkeerd
 
PHP hulp

PHP hulp

09/05/2024 14:30:57
 
- SanThe -

- SanThe -

11/01/2010 21:53:00
Quote Anchor link
Wat doen die cijfers daar?
 
Pim -

Pim -

11/01/2010 21:54:00
Quote Anchor link
Staan die nummers echt in je script?
Dan zal dat wel deze fout veroorzaken...

Die nummering moet dus weg.
 
Mads kroes

mads kroes

11/01/2010 22:00:00
Quote Anchor link
nee dat is standaard als ik met textwangler werk
 
- Ariën  -
Beheerder

- Ariën -

11/01/2010 22:07:00
Quote Anchor link
Haal die regelnummers-crap eens weg, door je post eens opnieuw aan te passen ;)
 
Mads kroes

mads kroes

11/01/2010 22:11:00
Quote Anchor link
ik heb de nummertje weg gehaald en met een andere php editor gewerkt nu werkt die wel ik zit nu alleen met een ander script te knooien ik dacht als de een werkt werkt de andere ook nu werkt die alleen nog niet.
dit is html
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<center>
<form action="/bestellen.php">
Voornaam:<br>
<input name="vnaam" type="text" id="vnaam">
<br><br>
Achternaamnaam:<br>
<input name="anaam" type="text" id="anaam">
<br><br>
Adres:<br>
<input name="adres" type="text" id="adres">
<br><br>  
Postcode:<br>
<input name="post" type="text" id="post">
<br><br>
Huis nummer/Postbus:<br>
<input name="huis" type="text" id="huis">
<br><br>
Telefoonnummer:<br>
<input name="tel" type="text" id="tel">
<br><br>    
Bestelling:<br>
<textarea name="bestel" cols="40" rows="5" id="bestel">
</textarea>
<br>  
<input type="submit" name="Submit" value="Verzenden">
<input type="reset" name="Submit2" value="Wissen">
 
</form>
</center>


en dit php
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    <?
        
        $recipient
=("[email protected]");
        $subject="Bestelling";
        

    $content=
        "Voornaam:".$vnaam.
        "
    Achternaam:"
.$anaam.
    "
        Adres:"
.adres$.
        "
        Postcode"
.$post.
        "
        Huisnummer:"
.$huis.
    "
     Telefoon:"
.$tel.
    "
    Bestelling:"
.$bestel.
    
    $message;
    
    mail($recipient, $subject, $content);
    
    echo "Uw mail is met succes verstuurd!";
    ?>

wat doe ik mis
 
Mads kroes

mads kroes

11/01/2010 22:11:00
Quote Anchor link
ik heb de nummertje weg gehaald en met een andere php editor gewerkt nu werkt die wel ik zit nu alleen met een ander script te knooien ik dacht als de een werkt werkt de andere ook nu werkt die alleen nog niet.
dit is html
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<center>
<form action="/bestellen.php">
Voornaam:<br>
<input name="vnaam" type="text" id="vnaam">
<br><br>
Achternaamnaam:<br>
<input name="anaam" type="text" id="anaam">
<br><br>
Adres:<br>
<input name="adres" type="text" id="adres">
<br><br>  
Postcode:<br>
<input name="post" type="text" id="post">
<br><br>
Huis nummer/Postbus:<br>
<input name="huis" type="text" id="huis">
<br><br>
Telefoonnummer:<br>
<input name="tel" type="text" id="tel">
<br><br>    
Bestelling:<br>
<textarea name="bestel" cols="40" rows="5" id="bestel">
</textarea>
<br>  
<input type="submit" name="Submit" value="Verzenden">
<input type="reset" name="Submit2" value="Wissen">
 
</form>
</center>


en dit php
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    <?
        
        $recipient
=("[email protected]");
        $subject="Bestelling";
        

    $content=
        "Voornaam:".$vnaam.
        "
    Achternaam:"
.$anaam.
    "
        Adres:"
.adres$.
        "
        Postcode"
.$post.
        "
        Huisnummer:"
.$huis.
    "
     Telefoon:"
.$tel.
    "
    Bestelling:"
.$bestel.
    
    $message;
    
    mail($recipient, $subject, $content);
    
    echo "Uw mail is met succes verstuurd!";
    ?>

wat doe ik mis
 
- SanThe -

- SanThe -

11/01/2010 22:15:00
Quote Anchor link
Zet dit bovenin je script.
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

// rest
?>
 
Mads kroes

mads kroes

11/01/2010 22:27:00
Quote Anchor link
oja bij het eerste scipt die ik gaf ontdek ik nu ook als ik hem invul en mail dat er niks in de mail komt te staan
 
- Ariën  -
Beheerder

- Ariën -

11/01/2010 23:00:00
Quote Anchor link
$vnaam, $anaam, $adres, $post etc.. komen nergens vandaan.
Er missen duidelijk superglobals, en je script stamt dus af ut het jaar 2003 ofzo
 
Leon

Leon

12/01/2010 00:06:00
Quote Anchor link
Is het niet handig om er ook
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?
<form method="post">
?>

erbij te zetten? Geen id of dit werkt maar dat staat er op Regel 2 en lijkt me niet in orde....

EDIT (haalde dom genoeg Action en Method door elkaar sorry...
Gewijzigd op 01/01/1970 01:00:00 door Leon
 
Joren de Wit

Joren de Wit

12/01/2010 00:08:00
Quote Anchor link
De action verwijst naar het de pagina waar het formulier naartoe verzonden moet worden. Ik vermoed dat jij de method bedoelt.

ps. Laat maar, je hebt het zelf al gezien :-)
Gewijzigd op 01/01/1970 01:00:00 door Joren de Wit
 
Mads kroes

mads kroes

12/01/2010 21:46:00
Quote Anchor link
heb
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

// rest
?>
er bij gezet en dan krijg ik deze fout
Parse error: syntax error, unexpected '<' in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/contact.php on line 5
 
- SanThe -

- SanThe -

12/01/2010 21:51:00
Quote Anchor link
En de bijbehorende relevante paar regels zijn?
 
Mads kroes

mads kroes

12/01/2010 21:56:00
Quote Anchor link
mijn hele php script is
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    <?

    $recipient
=("[email protected]");
    $subject="contact";
    <
form method="post">
    
    $content=
    "Voornaam:".$naam.
    "
    mail:"
.$mail.
        "  
    onderwerp:"
.$ond.

    "
    bericht:"
.$bericht.
    
    $message;
    
    mail($recipient, $subject, $content);
    
    echo "Uw mail is met succes verstuurd!";
    ?>

<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

// rest
?>
en html
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<center>
<form action="/contact.php">
Naam:<br>
<input name="naam" type="text" id="naam">
<br><br>
e-mailadres:<br>
<input name="mail" type="text" id="mail">
<br><br>
onderwerp:<br>
<input name="ond" type="text" id="ond">  
<br>
<br>
Bericht:<br>
<textarea name="bericht" cols="40" rows="5" id="berichtl">
</textarea>

<input type="submit" name="Submit" value="Verzenden">
<input type="reset" name="Submit2" value="Wissen">
 
</form>
</center>
 
Klaasjan Boven

Klaasjan Boven

12/01/2010 22:01:00
Quote Anchor link
<form method="post">

Hoort daar niet. Overigens voor de rest ook een baggerscript Blanche heeft een contactform gemaakt die wel goed is, zoek die eens op. Staat op phptuts.nl geloof ik
 
- SanThe -

- SanThe -

12/01/2010 22:03:00
Quote Anchor link
Zoals je zelf ziet is regel 4 php en regel 5 html.
Dat gaat niet door elkaar.

Edit: Die error_reporting() moet wel bovenaan en niet onderaan staan.
Gewijzigd op 01/01/1970 01:00:00 door - SanThe -
 
Mads kroes

mads kroes

23/01/2010 18:36:00
Quote Anchor link
sorry voor de lange tijd was op vakantie met school maar ik heb nu dit als php script
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

// rest
?>

<?
 
$recipient
=("[email protected]");
$subject="bestelling";
 
 
$content=
"
Voornaam:"
.$vnaam.
"
Achternaam:"
.$anaam.
"
adres:"
.$adres.
"
postcode:"
.$post.
"
huis:"
.$huis.
"
tel:"
.$tel.    
"
Bericht:"
.$bestel.
 
$message;
 
mail($recipient, $subject, $content);
 
echo "Uw mail is met succes verstuurd!";
?>

en daarmee krijg ik deze fout
Notice: Undefined variable: vnaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 15

Notice: Undefined variable: anaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 17

Notice: Undefined variable: adres in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 19

Notice: Undefined variable: post in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 21

Notice: Undefined variable: huis in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 23

Notice: Undefined variable: tel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 25

Notice: Undefined variable: bestel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 27

Notice: Undefined variable: message in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 29
Gewijzigd op 01/01/1970 01:00:00 door mads kroes
 
---- ----

---- ----

23/01/2010 18:48:00
Quote Anchor link
mads schreef op 23.01.2010 18:36:
sorry voor de lange tijd was op vakantie met school maar ik heb nu dit als php script
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

// rest
?>

<?
 
$recipient
=("[email protected]");
$subject="bestelling";
 
 
$content=
"
Voornaam:"
.$vnaam.
"
Achternaam:"
.$anaam.
"
adres:"
.$adres.
"
postcode:"
.$post.
"
huis:"
.$huis.
"
tel:"
.$tel.    
"
Bericht:"
.$bestel.
 
$message;
 
mail($recipient, $subject, $content);
 
echo "Uw mail is met succes verstuurd!";
?>

en daarmee krijg ik deze fout
Notice: Undefined variable: vnaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 15

Notice: Undefined variable: anaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 17

Notice: Undefined variable: adres in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 19

Notice: Undefined variable: post in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 21

Notice: Undefined variable: huis in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 23

Notice: Undefined variable: tel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 25

Notice: Undefined variable: bestel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 27

Notice: Undefined variable: message in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 29


Maak er eerst even van

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

 $recipient=("[email protected]");
$subject="bestelling";
 
 
$content=
"
Voornaam:"
.$vnaam.
"
Achternaam:"
.$anaam.
"
adres:"
.$adres.
"
postcode:"
.$post.
"
huis:"
.$huis.
"
tel:"
.$tel.    
"
Bericht:"
.$bestel.
 
$message;
 
mail($recipient, $subject, $content);
 
echo "Uw mail is met succes verstuurd!";
?>


met de comment tag //rest bedoelen we de rest van de code.
 
- Ariën  -
Beheerder

- Ariën -

23/01/2010 19:10:00
Quote Anchor link
Als ik een mooie opzet mag geven voor je script Afbeelding.
Let wel goed op de gele commentaar lijnen.

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
<?php
if($_SERVER['REQUEST_METHOD']=="POST") {
// hier komt je fout-afhandeling en mail-script...
} else {
// hier komt je formulier!
echo "Hier plaats ik mijn formulier.";
}

?>
 
Mads kroes

mads kroes

23/01/2010 19:11:00
Quote Anchor link
nu krijg dit,

Notice: Undefined variable: vnaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 11

Notice: Undefined variable: anaam in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 13

Notice: Undefined variable: adres in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 15

Notice: Undefined variable: post in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 17

Notice: Undefined variable: huis in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 19

Notice: Undefined variable: tel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 21

Notice: Undefined variable: bestel in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 23

Notice: Undefined variable: message in /customers/manivideoproductie.com/manivideoproductie.com/httpd.www/bestellen.php on line 25
Uw mail is met succes verstuurd!
Gewijzigd op 01/01/1970 01:00:00 door mads kroes
 

Pagina: 1 2 3 volgende »



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.