[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - parse error
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

parse error

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

parse error

Berichtdoor mattle » 02 nov 2005 20:53

[syntax="php"]<?php
include"config.php";

if($submit) {

$select = "SELECT * FROM partners WHERE sitenaam='$sitenaam'";
$query = mysql_query($select)or die(mysql_error());

if(mysql_num_rows($query) == 1 ) { ?>
<?php

$rtlo = 1001; // Niet vergeten te wijzigen
$test = 1; // Zet deze op false na het testen

$sent = ($sent) ? $sent : $_GET["sent"];
$pincode = ($pincode) ? $pincode : $_GET["pincode"];
$username = ($username) ? $username : $_GET["username"];

if (!$sent)
{
echo "<form method=post>\n<input type=hidden name=sent value=1>\n".
"Om je aantal credits op te waarderen bel je naar <b>0909-8356</b>".
" (&euro; 1,30 per gesprek).\n<br>".
"Vul hieronder de 6-cijferige pincode in die je krijgt tijdens ".
"het bellen en je username in, en druk op OK:\n<br><br>".
"<table>".
"<tr><td><b>Pincode: &nbsp;</td>".
"<td><input name=pincode maxlength=6 size=6></td></tr>\n".
<form name="form1" method="post" action="aanmelden.php">
<table width="400" border="0">
<tr>
<td colspan="2"><b>Aanmelden voor de Link exchange:</td>
</tr>
<tr>
<td width="30%">Naam</td>
<td width="70%">
<input type="text" name="naam">
</td>
</tr>
<tr>
<td width="30%">Email</td>
<td width="70%">
<input type="text" name="email">
</td>
</tr>
<tr>
<td width="30%">Site naam</td>
<td width="70%">
<input type="text" name="sitenaam">
</td>
</tr>
<tr>
<td width="30%">Site url</td>
<td width="70%">
<input type="text" name="siteurl" value="http://">
</td>
</tr>
<tr>
"<tr><td></td><td><input type=submit value=\" OK \"></td></tr>\n".
"</form>\n";
} else
if ((!$$naam) || (!$pincode) || (!$sitenaam) || (!$siteurl) || (!$email) || (!$siteurl))
{
die ("je bent een veld vergeten!");
} else
{
$code = $pincode;
$co = "31";
$url = "http://www.ringtonio.nl/mp?test=$test&co=$co&rtlo=$rtlo&code=".urlencode($code);
$result = @implode("",file($url));

if (!$result)
{
die ("Je betaalcode kan momenteel niet gecontroleerd worden, probeer het later nog eens.");
} else
{
if (substr($result,0,2)=="OK")
{
$insert = "INSERT INTO partners (naam,email,sitenaam,siteurl,inhits,uithits) VALUES ('$naam','$email','$sitenaam','$siteurl','0','0')";
$query = mysql_query($insert)or die(mysql_error());


$query = "SELECT * FROM partners WHERE naam='$naam'";
$result = mysql_query($query);
while ($list = mysql_fetch_object($result)) {
$id = $list->id;
}
echo "Link naar de site op deze manier: $site_url/inhits.php?action=tel&id=$id<br>";
echo "Onthoud deze gegevens goed.<br>";
echo "Veel plezier ermee.";

mail("$email", "$site_naam, Succesvol Aangemeld", "Hoi $naam,

Je gegevens zijn succes vol toegevoegd aan het partner systeem.

Je bent geregistreerd met de volgende gegevens:

Naam: $naam
Site naam: $sitenaam
Site url: $siteurl

Om je hits te versturen naar $site_naam moet je linken naar het volgende adres:
$site_url/scripts/inhits.php?action=tel&id=$id

Bewaar of onthoud deze gegevens goed!

Veel succes!

Met vriendelijke groet,
De webmasters van $site_naam,
$site_naam", "From: Webmaster $site_naam<$email_adres>\nReturn-path: $email_adres");
}
}
else {
} else
{
// echo $url."<br>";
die ($result); // Laat foutcode zien
}
}
}

?>
[/syntax]

hier moet een foutje in zitten.
het gaat om een parse error op line 29 maar ik kan er niets verkeerds zien.
en is de code goed?
het gaat presies om een systeem waar je eerst moet betalen via telefoon dan mag je een link plaatsen als partner.
dus is deze code veilig?
oh ja hij zij unspected "^" on line 29
mattle
 

Berichtdoor KillerSponge » 02 nov 2005 21:53

Het gaat fout bij de echo, en dan met name de quotes.

Als je echo "hoi"; zegt, gaat het goed. echo "hoi"."hoi"; is ook goed. Maar wat jij doet, is echo "hoi"."<form blaat="zooi">";. Die extra quotes in het form gebeuren zorgen voor nogal wat verwarring voor php. Je kan het beste de 2 verschillende quotes gebruiken. Bv. echo '<form poep="pipo"';. Dit werkt namelijk wel Razz

Ik zie trouwens nu dat er überhaubt helemaal geen quotes staan om het form gedeelte. Dat moet je dus ook nog ff doen Razz
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Berichtdoor mattle » 03 nov 2005 15:56

mattle
 

Berichtdoor KillerSponge » 03 nov 2005 18:14

Rij 29: " <table width="400" border="0">".

Dát vind PHP niet leuk Razz

Zoals ik al zei, je moet verschillende quotes gebruiken ( ' in je php code, en " in je html code, of andersom), óf je moet in je html code voor de " quotes een backslash (\) zetten. Dan neemt php de code niet mee Smile

Je hoeft trouwens niet voor elke nieuwe regel de quotes af te sluiten en met een ." te beginnen. Een echo kan gewoon meerdere regels beslaan Smile
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Berichtdoor mattle » 04 nov 2005 15:44

wil je anders een stukje code plakken hoe ik het moet doen.
het lukt me echt niet!
mattle
 

Berichtdoor dpd » 04 nov 2005 16:52

Lijkt me toch duidelijk wat KillerSponge zegt?
Als je 'echo' gebruikt, mag je geen dubbele aanhalingstekens (") gebruiken, slechts enkele (').
Dus wijzig overal waar je na 'echo' dubbele aanhalingstekens hebt gebruikt naar enkele en je zult geen errors meer krijgen als 't goed is.

[syntax="php"]" <table width="400" border="0">".[/syntax]
wordt dus
[syntax="php"]" <table width='400' border='0'>".[/syntax]

en in regel 31
[syntax="php"]" <td colspan="2"><b>Aanmelden voor de Link exchange:</td>".[/syntax]
moet het worden
[syntax="php"]" <td colspan='2'><b>Aanmelden voor de Link exchange:</td>".[/syntax]

en in regel 34
[syntax="php"]" <td width="30%">Naam</td>".[/syntax]
wordt
[syntax="php"]" <td width='30%'>Naam</td>".[/syntax]

etc etc Wink

[EDIT]
Waarom sluit je trouwens op regel 9 je php-code en open je hem weer op regel 10? Kun je net zo goed door laten lopen.
[/EDIT]
Blast!
Avatar gebruiker
dpd
wmpr
 
Berichten: 57
Geregistreerd: 19 okt 2005 08:33
Woonplaats: Nijmegen

Berichtdoor KillerSponge » 04 nov 2005 17:04

Om het nog ingewikkelder te maken: het mag ook andersom. Razz
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Berichtdoor mattle » 04 nov 2005 17:33

mattle
 

Berichtdoor KillerSponge » 04 nov 2005 18:05

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Berichtdoor mattle » 04 nov 2005 18:06

mattle
 

Berichtdoor KillerSponge » 04 nov 2005 18:19

Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05


Keer terug naar PHP, ASP, SQL



cron