Opgelost
Php ticket actief
Opgelost
En nu even je vraag goed formulieren? Eventueel een screen? vb?
Quote:
Als het in de veld actief op 1 staat, moet de button weg en een tekst voor schijn te komen
en als actief op 1 staat staat die button er nog en dat moet niet.
Quote:
Als het in de veld actief op 1 staat, moet de button weg en een tekst voor schijn te komen
en als actief op 1 staat staat die button er nog en dat moet niet.
Kijk
Als ticket wordt moeten gesloten staat die op actief 1
normaal moet die button weg en de tekst weergeven
Maar dat doet die niet
Als ticket wordt moeten gesloten staat die op actief 1
normaal moet die button weg en de tekst weergeven
Maar dat doet die niet
verwissel je 1 en 0 nu niet?
0 = nee
1 = ja
Los daarvan, geef ons de hele code(de mysql fetch enzo)
0 = nee
1 = ja
Los daarvan, geef ons de hele code(de mysql fetch enzo)
table style="border: 0;">
<form method="post" action="">
<tr>
<td style="width: 250px; vertical-align: top;">
Bericht:
</td>
<td>
<textarea name="message" style="width: 500px; height: 150px;" value="<?(isset($_GET[bericht])) { echo htmlspecialchars($_GET[bericht]); } ?>" id="newpbtext"></textarea>
</td>
</tr>
</table>
<br />
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"actief"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<table width="670" bgcolor="#FFB0B0" style="border:1px solid #CC0000; padding:3px;" cellpadding="0" cellspacing="0"><tr><td>
Deze ticket is gesloten, wegens succesvol afgehandeld.
</table>[/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]<input type="submit" name="submit" value="Versturen" />[/COLOR][COLOR= #007700];
}[/COLOR]
?>
sql :
$sql = "SELECT * FROM ticket WHERE van = " . mysql_real_escape_string($_SESSION[uid]) . " ORDER BY id ASC"; $sql = "SELECT * FROM ticket WHERE van = " . mysql_real_escape_string($_SESSION[uid]) . " ORDER BY id ASC";
dit moet je ook niet doen, je moet selecteren van het id dat ik meegegeven.
En die zin die je zegt als het ticket is afgehandeld klopt ook niet echt.
dit moet je ook niet doen, je moet selecteren van het id dat ik meegegeven.
En die zin die je zegt als het ticket is afgehandeld klopt ook niet echt.
Heb het nu anders gedaan maar hij werkt nog steeds niet 

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row1[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"actief"[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$row1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query1[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$sql1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT actief FROM ticket WHERE van = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$query1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql1[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<table width="670" bgcolor="#FFB0B0" style="border:1px solid #CC0000; padding:3px;" cellpadding="0" cellspacing="0"><tr><td>
Deze ticket is gesloten, wegens succesvol afgehandeld.
</table>[/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]<input type="submit" name="submit" value="Versturen" />[/COLOR][COLOR= #007700];
}[/COLOR]
?> [COLOR= #0000BB]<?php
$actiefQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM ticket WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND van="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uid[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$actiefFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$actiefQuery[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$actiefFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actief[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
<table width="670" bgcolor="#FFB0B0" style="border:1px solid #CC0000; padding:3px;" cellpadding="0" cellspacing="0"><tr><td>
Deze ticket is gesloten, wegens succesvol afgehandeld.
</table>[/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]<input type="submit" name="submit" value="Versturen" />[/COLOR][COLOR= #007700];
}[/COLOR]
?> Beveilig het zelf eens en pas het aan.
Zou normaal moeten werken.
Nope werkt nog steeds niet hij laat steeds die button nog zien.