Script

Gestart doorMertdelft27 reacties57 weergaven

28 berichten · pagina 2 van 2

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Wat wil je? via een MySQL database of zoals Aarclay zegt via een config-file?
0
Mertdelft

Lid · Topicstarter

Berichten
414
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Via mysql
0
Berichten
3.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Videotube schreef:
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
Config file;

[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nee[/COLOR]
?>


Website:

[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]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
Eerdere citaten tonen
Videotube schreef:
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
Config file;

[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nee[/COLOR]
?>


Website:

[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]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>

http://www.one2xs.com/forum/postredir?pid=708518 redfaceDie van jou is trouwens slechter wink
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
Maartenl schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Videotube schreef:
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
Config file;

[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nee[/COLOR]
?>


Website:

[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]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>

http://www.one2xs.com/forum/postredir?pid=708518 redfaceDie van jou is trouwens slechter wink
Mijne is altijd slechteremo
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
Maartenl schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Videotube schreef:
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
Config file;

[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nee[/COLOR]
?>


Website:

[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]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>

http://www.one2xs.com/forum/postredir?pid=708518 redfaceDie van jou is trouwens slechter wink
Mijne is altijd slechteremo
Ik bedoel dat je met true & false moet werken, niet met ja en neen smile
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Maartenl schreef:
Eerdere citaten tonen
Dylanh schreef:
[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
Eerdere citaten tonen
Maartenl schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Videotube schreef:
Ik raad je config aan, dan kun je er sneller bij, geen gerommel met mysql en is ook handig als je MySQL connectie eruit ligt.
Config file;

[COLOR= #0000BB]<?php
$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nee[/COLOR]
?>


Website:

[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]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]ja[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>

http://www.one2xs.com/forum/postredir?pid=708518 redfaceDie van jou is trouwens slechter wink
Mijne is altijd slechteremo
Ik bedoel dat je met true & false moet werken, niet met ja en neen smile
Naja, hij wou via mysql duss:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// maak hier verbindign met database
// selecteer hier de db[/COLOR]
[COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT status FROM onderhoud"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]true[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// maak hier verbindign met database
// selecteer hier de db[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ding[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE onderhoud SET status = "[/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]ding[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form action=# method=post>
<select name="ding">
<option value="true">aan</option>
<option value="false">uit</option>
</select>
<input type=submit value=ok ->/>
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


en dit moet je zelf maar even doen:

een tabel maken genaamd onderhoud, met 1 veld erin genaamd status,
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat dacht je van mysql_fetch_assoc e.d.?
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Gamedealer schreef:
Wat dacht je van mysql_fetch_assoc e.d.?
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// maak hier verbindign met database
// selecteer hier de db[/COLOR]
[COLOR= #0000BB]$onderhoud[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM onderhoud"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$check[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$onderhoud[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$check[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]status[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]true[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]we zijn in onderhoud![/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// website code[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
En foutenafhandeling smile
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Maartenl schreef:
En foutenafhandeling smile
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// maak hier verbindign met database
// selecteer hier de db[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ding[/COLOR][COLOR= #007700]])) {[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE onderhoud SET status = "[/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]ding[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Succesvol aangepast <img src="http://www.one2xs.com/img/smileys/biggrin.gif">[/COLOR][COLOR= #007700];
 }
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form action=# method=post>
<select name="ding">
<option value="true">aan</option>
<option value="false">uit</option>
</select>
<input type=submit value=ok ->/>
</form>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nvm ik ben scheel emo.
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