Php ticket actief

Gestart doorPropje9 reacties51 weergaven

10 berichten · pagina 1 van 1

Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Opgelost
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
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.
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
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
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
verwissel je 1 en 0 nu niet?

0 = nee
1 = ja

Los daarvan, geef ons de hele code(de mysql fetch enzo)
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
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";
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@PM: $row word pas later gemaakt in de while, dus tuurlijk krigj je hem dan niet te zien.

ik zou trouwens eerst wat oefenen in net programmeren en dan grote codes schrijven. Want je code is zeer onoverzichtelijk (houdt php en html gescheiden)
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$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.
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb het nu anders gedaan maar hij werkt nog steeds niet confused
[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]
?>
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[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.
0
Propje

Lid · Topicstarter

Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nope werkt nog steeds niet hij laat steeds die button nog zien.
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