Kleine Vragen Topic #2

Gestart doorKingunit3.067 reacties11.764 weergaven

3.068 berichten · pagina 14 van 205

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb emails aan staan, krijg elke keer foutmelding dat het pad niet bestaat..

Ik roep hem zo aan:

/usr/local/bin/php /home/xxx/domains/xxxx.nl/cron.php

toevoeging op 25 april 2013, 17:47:29:
Hmm hij werkt al, heb nu dit:

require_once(/home/xxx/domains/xxx.nl/public_html/includes/config.php);
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Milan schreef:
Hey,

Ik heb een probleem met mijn cronjob, hij staat een map boven de public_html (home/users/xxx/henk.nl/cronjob.php), en ik heb problemen met het includen van de config.php (home/users/xxx/henk.nl/public_html/includes/config.php).

Ik heb de onderstaande opties al geprobeerd:

[COLOR= #0000BB]<?php[/COLOR]

[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000] /home/xxx/domains/henk.nl/public_html/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/home/xxx/domains/henk.nl/public_html/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]public_html/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/public_html/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//Bij deze pakt hij het hoofddomein in DA[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]DOCUMENT_ROOT[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]

?>
Maar niks werkt, het rare is dat $_SERVER[DOCUMENT_ROOT] leeg is...

Weet iemand hoe ik die config.php kan oproepen? Want ik wordt er echt niet wijs uit...

Alvast bedankt,
Milan

Een tip voor jouw.
In je Index.php of config.php

is het misschien handig om dit te defineren:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]SERVER_ROOT[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]/home/xxx/domains/henk.nl/public_html/[/COLOR][COLOR= #007700]);[/COLOR]
?>


En dan kan je bij de requires doen

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR]SERVER_ROOT [COLOR= #007700].[/COLOR] [COLOR= #DD0000]includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR]SERVER_ROOT [COLOR= #007700].[/COLOR] [COLOR= #DD0000]includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR]SERVER_ROOT [COLOR= #007700].[/COLOR] [COLOR= #DD0000]includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR]SERVER_ROOT [COLOR= #007700].[/COLOR] [COLOR= #DD0000]includes/config.php[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]//Bij deze pakt hij het hoofddomein in DA[/COLOR]
[URL="http://www.php.net/require_once"]require_once[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]DOCUMENT_ROOT[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Milan schreef:
Maar niks werkt, het rare is dat $_SERVER[DOCUMENT_ROOT] leeg is...
Is niet raar, die variabele wordt door Apache meegegeven, maar een cronjob naar een PHP-script werkt als je hem oproept zonder wget, altijd direct via PHP, en dan is deze niet gevuld.

Oplossing:
Navigeer met cd naar het path, en roep het bestand aan.

cd /pad/naar/je/directory && php script.php


Gebruik deze manier:

include dirname(__FILE__) . /../../ . includedfile.php; //voorbeeld


je kan ook net als Freestyle zegt je path in een define gooien, maar dan moet je het bij een serververhuizing mogelijk weer aanpassen, en weer tussentijds spieken met $_SERVER[DOCUMENT_ROOT] naar wat het nieuwe pad is.

Mijn gegeven mogelijkheden moeten al direct werken.
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja dat kan ook (die manier heb ik nooit gezien).

Maar mijn manier is niet veel werk bij een verhuizing, bij jouw natuurlijk 0 maar toch smile
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het werkte inmiddels al
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$("#register_form").bind("submit", function() {
        $.ajax({
            type    : "POST",
            cache    : false,
            url        : "ajax",
            dataType : json,
            data:  { email: $("#email").val(), password: $("#password").val(), accountType: $(input:radio[name=type]:checked).val(), action:signUp },
            success: function(data) {
                $("#register_error").show("fast", function () {
                   $(this).html(data.msg);
                }).fadeIn("fast");
            },
            error : function(XMLHttpRequest, textStatus, errorThrown) {
                alert(errorThrown);
            }
        });

        return false;
    });


Weet iemand waarom een Unexpected token g error krijg, terwijl ik niet krijg op localhost?

Problem solved, er zat ergens een stukje tekst.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb een probleem met mijn PHP code. Hij geeft de volgende error(s):
Notice: Undefined index: id in C:xampphtdocsconfig.php on line 11

Notice: Undefined index: gebruikersnaam in C:xampphtdocsinloggen.php on line 3

Notice: Undefined index: gebruikersnaam in C:xampphtdocsinloggen.php on line 4

Notice: Use of undefined constant sha512 - assumed sha512 in C:xampphtdocsinloggen.php on line 5

Notice: Undefined index: wachtwoord in C:xampphtdocsinloggen.php on line 5

En ja, ik heb al een 30 - 60 min op google staan zoeken, maar ik begrijp niet wat er nu fout is. De code staat hieronder in de spoiler. Alvast bedankt!
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$NaamCheckQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" LIMIT 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR] 
[COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]);[/COLOR] 
[COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]=[/COLOR]hash[COLOR= #007700]([/COLOR]sha512[COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]);[/COLOR] 
[COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$NaamCheckQuery[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) {[/COLOR] /
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]])) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Je hebt geen gebruikersnaam ingevuld!</font><br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Je hebt geen wachtwoord ingevuld!</font><br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$NaamCheckQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) 
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Deze gebruiker bestaat niet!</font><br />"[/COLOR][COLOR= #007700];    
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$wachtwoord[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Het wachtwoord is onjuist!</font><br />"[/COLOR][COLOR= #007700];        
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ban[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) 
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Je bent verbannen.</font><br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR] 
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=green>Je bent ingelogd! (Je word doorgestuurd)</font><br />"[/COLOR][COLOR= #007700];
    }
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR] 
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent al ingelogd, het is niet nodig om opnieuw in te loggen!
          <meta http-equiv=refresh content=0;URL=index.php />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form action= method=post>
          Gebruikersnaam: <input type=text name=gebruikersnaam /><br />
          Wachtwoord: <input type=password name=wachtwoord /><br />
          <input type=submit value=Inloggen/>
          </form>"[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
$_POST[gebruikersnaam] bestaat niet, controleer gewoon met

if($_SERVER[REQUEST_METHOD]=="POST") {


of deze bestaat!

Dus even een stukje hogerop in de code plaatsen.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
$_POST[gebruikersnaam] bestaat niet, controleer gewoon met

if($_SERVER[REQUEST_METHOD]=="POST") {


of deze bestaat!

Dus even een stukje hogerop in de code plaatsen.
Maar dat heb ik toch al (op lijn 7) of begrijp ik het nu verkeerd?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Jordyvc schreef:
Eerdere citaten tonen
Aarclay schreef:
$_POST[gebruikersnaam] bestaat niet, controleer gewoon met
if($_SERVER[REQUEST_METHOD]=="POST") {


of deze bestaat!

Dus even een stukje hogerop in de code plaatsen.
Maar dat heb ik toch al (op lijn 7) of begrijp ik het nu verkeerd?

Hogerop.

Je vraagt op lijn 2 t/m lijn 6 waardes op in de $_POST array. Daarna check je pas of er een formulier gepost is (en de $_POST array dus bepaalde waardes heeft).
Omdat je al voor je POST-check $_POST waardes op gaat vragen krijg je de bovenstaande fouten.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Eerdere citaten tonen
Jordyvc schreef:
Eerdere citaten tonen
Aarclay schreef:
$_POST[gebruikersnaam] bestaat niet, controleer gewoon met
if($_SERVER[REQUEST_METHOD]=="POST") {


of deze bestaat!

Dus even een stukje hogerop in de code plaatsen.
Maar dat heb ik toch al (op lijn 7) of begrijp ik het nu verkeerd?
Hogerop.

Je vraagt op lijn 2 t/m lijn 6 waardes op in de $_POST array. Daarna check je pas of er een formulier gepost is (en de $_POST array dus bepaalde waardes heeft).
Omdat je al voor je POST-check $_POST waardes op gaat vragen krijg je de bovenstaande fouten.

Ah dus als ik het goed begrijp moeten die POST checks onder lijn 7 komen?

toevoeging op 26 april 2013, 18:48:53:
Dit heb ik nu al:

[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]]==[/COLOR][COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]) {[/COLOR] 
    [COLOR= #0000BB]$NaamCheckQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gebruikers WHERE gebruikersnaam="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" LIMIT 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR] 
    [COLOR= #0000BB]$data[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$NaamCheckQuery[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]])) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Je hebt geen gebruikersnaam ingevuld!</font><br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Je hebt geen wachtwoord ingevuld!</font><br />"[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$NaamCheckQuery[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) 
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Deze gebruiker bestaat niet!</font><br />"[/COLOR][COLOR= #007700];    
    }[/COLOR]
    [URL="http://www.php.net/elseif"]elseif[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$wachtwoord[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]) {[/COLOR] 
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=red>Het wachtwoord is onjuist!</font><br />"[/COLOR][COLOR= #007700];        
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]] =[/COLOR] [URL="http://www.php.net/strtolower"]strtolower[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]);[/COLOR] 
        [COLOR= #0000BB]$wachtwoord[/COLOR][COLOR= #007700]=[/COLOR]hash[COLOR= #007700]([/COLOR]sha512[COLOR= #007700],[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]]);[/COLOR] 

        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]];[/COLOR] 
        [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]=[/COLOR][COLOR= #0000BB]$data[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<font color=green>Je bent ingelogd! (Je word doorgestuurd)</font><br />"[/COLOR][COLOR= #007700];
    }
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR] 
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bent al ingelogd, het is niet nodig om opnieuw in te loggen!
          <meta http-equiv=refresh content=0;URL=index.php />"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<form action= method=post>
          Gebruikersnaam: <input type=text name=gebruikersnaam /><br />
          Wachtwoord: <input type=password name=wachtwoord /><br />
          <input type=submit value=Inloggen/>
          </form>"[/COLOR][COLOR= #007700]; 
}[/COLOR]
?>


Klopt dit, of is dit al totaal verkeerd? Er staat nu wel maar 1 error namelijk:
Notice: Undefined index: id in C:xampphtdocsconfig.php on line 11
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Dan zouden we de config moeten hebben om die fout op te kunnen lossen.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Dan zouden we de config moeten hebben om die fout op te kunnen lossen.
Heb het al opgelost. Bedankt. biggrin
toevoeging op 26 april 2013, 211108:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1
wat is dit?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jordyvc schreef:
Eerdere citaten tonen
Rik schreef:
Dan zouden we de config moeten hebben om die fout op te kunnen lossen.
Heb het al opgelost. Bedankt. biggrin
toevoeging op 26 april 2013, 211108:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1
wat is dit?
Dat is niet Googlen.
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Jordyvc schreef:
Eerdere citaten tonen
Rik schreef:
Dan zouden we de config moeten hebben om die fout op te kunnen lossen.
Heb het al opgelost. Bedankt. biggrin
toevoeging op 26 april 2013, 211108:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near at line 1
wat is dit?
Dat is niet Googlen.
Al gedaan.

toevoeging op 26 april 2013, 221146:
Als ik het niet begrijp, zijn alleen maar problemen van andere die ze oplossen, maar geen verklaring van die error.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren