Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 4:12 PM   #1
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

Hello...

I have a forum where you can send messages to any other member. But now i
want to have a <option> where you can choose the members. Because now you
have to type it...

Maybe anyone can help me.

I will show you the page: message.php
And the sql-table: users

The site is: http://members.lycos.nl/wbdf/wbdfforum/

Thank you very much, Arjan

*****
message.php
*****
<?php
include "nav.php";
include "ubb.php";
echo "<br><br>";

if ($loggedin == 1) {
if (isset ($delete)) {
$delete_check_query = "SELECT receiver FROM messages WHERE id=$delete";
$delete_check_exec = mysql_query ($delete_check_query);
$delete_check_result = mysql_fetch_array ($delete_check_exec);
$delete_check = $delete_check_result["receiver"];

if ($myid == $delete_check) {
$delete_query = "DELETE FROM messages WHERE id=$delete";
$delete_exec = mysql_query ($delete_query);
}
}

$inbox_query = "SELECT id,sender,subject,date,msgread FROM messages WHERE
receiver='$myid' ORDER BY date DESC";
$inbox_exec = mysql_query($inbox_query);

echo "<center>";
echo "<table width=750 cellspacing=0 cellpadding=0 style='border-style:
solid; border-width: 1; border-color: $mycolor3;'>";
echo "<tr>";
echo "<td bgcolor=$mycolor4>";
echo "<table cellspacing=0 cellpadding=2>";
echo "<tr>";
echo "<td width=100 bgcolor=$mycolor2 align=center style='border-style:
solid; border-color: $mycolor3; border-width: 1;'><font face=$myfont
color=$mycolor5 size=2><b>opties</b></font></td>";
echo "<td width=300 bgcolor=$mycolor2 align=center style='border-style:
solid; border-color: $mycolor3; border-width: 1;'><font face=$myfont
color=$mycolor5 size=2><b>onderwerp</b></font></td>";
echo "<td width=150 bgcolor=$mycolor2 align=center style='border-style:
solid; border-color: $mycolor3; border-width: 1;'><font face=$myfont
color=$mycolor5 size=2><b>van</b></font></td>";
echo "<td width=200 bgcolor=$mycolor2 align=center style='border-style:
solid; border-color: $mycolor3; border-width: 1;'><font face=$myfont
color=$mycolor5 size=2><b>datum</b></font></td>";
echo "</tr>";
echo "</table>";

echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=4 style='border-style: solid;
border-width: 1; border-color: $mycolor3;'>";

$total_messages = mysql_num_rows ($inbox_exec);

if ($total_messages == 0) {
echo "<tr>";
echo "<td width=750 bgcolor=$mycolor4><font face=$myfont color=$mycolor5
size=2><center><i>Uw inbox is leeg</i></center></font></td>";
echo "</tr>";
}

while ($inbox_result = mysql_fetch_array($inbox_exec)) {
$id = $inbox_result["id"];
$sender = $inbox_result["sender"];
$subject = $inbox_result["subject"];
$date = $inbox_result["date"];
$msgread = $inbox_result["msgread"];

if ($msgread == 1) {
$bold_start = "";
$bold_end = "";
}

else {
$bold_start = "<b>";
$bold_end = "</b>";
}

$sendernick_query = "SELECT nick FROM users WHERE id=$sender";
$sendernick_exec = mysql_query ($sendernick_query);
$sendernick_result = mysql_fetch_array ($sendernick_exec);
$sendernick = $sendernick_result["nick"];

if ($id == $viewmessage) {
echo "<tr>";
echo "<td width=100 bgcolor=$mycolor4><font face=$myfont
color=$mycolor5 size=2><a href=message.php?delete=$id>verwijder</a> | <a
href='message.php?send=$sender&sendsubject=re:
$subject'>beantwoord</a></font></td>";
echo "<td width=300 bgcolor=$mycolor4><font face=$myfont
color=$mycolor5 size=2><a
href=message.php?viewmessage=$id>$bold_start$subje ct$bold_end</a></font></td
>";

echo "<td width=150 bgcolor=$mycolor4><font face=$myfont
color=$mycolor5 size=2><a
href=user.php?id=$sender>$sendernick</a></font></td>";
echo "<td width=200 bgcolor=$mycolor4 align=center><font face=$myfont
color=$mycolor5 size=2>$date</font></td>";
echo "</tr>";
}

else {
echo "<tr>";
echo "<td width=100 bgcolor=$mycolor2><font face=$myfont
color=$mycolor5 size=2><a href=message.php?delete=$id>verwijder</a> | <a
href='message.php?send=$sender&sendsubject=re:
$subject'>beantwoord</a></font></td>";
echo "<td width=300 bgcolor=$mycolor2><font face=$myfont
color=$mycolor5 size=2><a
href=message.php?viewmessage=$id>$bold_start$subje ct$bold_end</a></font></td
>";

echo "<td width=150 bgcolor=$mycolor2><font face=$myfont
color=$mycolor5 size=2><a
href=user.php?id=$sender>$sendernick</a></font></td>";
echo "<td width=200 bgcolor=$mycolor2 align=center><font face=$myfont
color=$mycolor5 size=2>$date</font></td>";
echo "</tr>";
}
}
echo "</table>";
echo "</table>";

if (isset ($viewmessage) AND !isset ($send)) {
$message_check_query = "SELECT receiver FROM messages WHERE
id=$viewmessage";
$message_check_exec = mysql_query ($message_check_query);
$message_check_result = mysql_fetch_array ($message_check_exec);
$message_check = $message_check_result["receiver"];

if ($message_check != 0 AND $myid != $message_check) {
echo '<script>location.href="message.php"</script>';
}

$message_query = "SELECT sender,subject,text,date,msgread FROM messages
WHERE id=$viewmessage";
$message_exec = mysql_query($message_query);
$message_result = mysql_fetch_array($message_exec);

$sender = $message_result["sender"];
$subject = $message_result["subject"];
$date = $message_result["date"];
$text = $message_result["text"];
$msgread = $message_result["msgread"];

set_emoticons ($text);
set_ubb_forum ($text, $myfont, $mycolor3, $mycolor4, $mycolor5);

if ($msgread == 0) {
$msgread_query = "UPDATE messages SET msgread='1' WHERE
id='$viewmessage'";
$msgread_exec = mysql_query ($msgread_query);
}

$sendernick_query = "SELECT nick FROM users WHERE id=$sender";
$sendernick_exec = mysql_query ($sendernick_query);
$sendernick_result = mysql_fetch_array ($sendernick_exec);
$sendernick = $sendernick_result["nick"];

echo "<table width=750 bgcolor=$mycolor4 cellspacing=4
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=2 style='border-style: solid;
border-width: 1; border-color: $mycolor3;'>";
echo "<tr>";
echo "<td colspan=2 width=750 bgcolor=$mycolor2><font face=$myfont
color=$mycolor5 size=2>$text</font></td>";
echo "</tr>";
echo "</table>";
echo "</table>";
}

if (isset ($send)) {
$receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
$receiver_nick_exec = mysql_query ($receiver_nick_query);
$receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
$receiver_nick = $receiver_nick_result["nick"];

if (isset ($submit)) {
$id_query = "SELECT id FROM users WHERE nick='$send'";
$id_exec = mysql_query ($id_query);
$id_result = mysql_fetch_array ($id_exec);
$id = $id_result["id"];

if ($id !="" AND $sendsubject != "" AND $text != "") {
$date = date("Y-m-d_His");
$send_query = "INSERT INTO messages VALUES
('','$myid','$id','$sendsubject','$text','$date',' 0')";
$send_exec = mysql_query ($send_query);

echo '<script>location.href="message.php"</script>';
}
}

echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=2 style='border-style: solid;
border-width: 1; border-color: $mycolor3;'>";
echo "<form method=post action=message.php?send=$send>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2 align=center><font
face=$myfont color=$mycolor5 size=1><b>Naar
(gebruikersnaam)</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center><input
name=send type=text size=53 value='$receiver_nick' maxlength=50
style='border-color: #000000; border-width: 1;'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2 align=center><font
face=$myfont color=$mycolor5 size=1><b>Onderwerp</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center><input
name=sendsubject type=text size=53 value='$sendsubject' maxlength=50
style='border-color: #000000; border-width: 1;'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2 align=center><font
face=$myfont color=$mycolor5 size=1><b>Bericht</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center><textarea
name=text cols=40 rows=8 style='border-color: #000000; border-width:
1;'>$text</textarea></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
name=submit type=submit value='Verstuur' style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
echo "</table>";
echo "</center>";
}

echo "</td>";
echo "</tr>";

if (!isset ($send)) {
echo "<tr>";
echo "<td bgcolor=$mycolor4>";
echo "<font face=$myfont color=$mycolor5 size=2><center><b><a
href=message.php?send=>Stuur een bericht</a></b></center></font>";
echo "</td>";
echo "</tr>";
}

echo "</table>";
echo "</center>";
}
?>

<noscript><noscript>
<plaintext><plaintext>

*****
SQL-Table Users
*****
CREATE TABLE users (
id int(10) unsigned NOT NULL auto_increment,
nick varchar(50) default NULL,
name varchar(50) default NULL,
password varchar(50) default NULL,
avater_filename varchar(50) default NULL,
avater_filesize varchar(50) default NULL,
profile text,
email varchar(50) default NULL,
city varchar(50) default NULL,
province varchar(50) default NULL,
birthdate varchar(10) default NULL,
*** varchar(6) default NULL,
created datetime default NULL,
edited datetime default NULL,
hits int(10) default NULL,
ip varchar(16) default NULL,
colors varchar(50) default NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 4:12 PM   #2
Warstar
 
Warstar's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

Ik denk dat dit moet werken weet niet zeker

if (isset ($send))
{
$receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
$receiver_nick_exec = mysql_query ($receiver_nick_query);
$receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
$receiver_nick = $receiver_nick_result["nick"];

if (isset ($submit))
{
$id_query = "SELECT id FROM users WHERE id='$send'";
$id_exec = mysql_query ($id_query);
$id_result = mysql_fetch_array ($id_exec);
$id = $id_result["id"];

if ($id !="" AND $sendsubject != "" AND $text != "")
{
$date = date("Y-m-d_His");
$send_query = "INSERT INTO messages VALUES
('','$myid','$id','$sendsubject','$text','$date',' 0')";
$send_exec = mysql_query ($send_query);
echo '<script>location.href="message.php"</script>';
}
}

echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=2 style='border-style:
solid; border-width: 1; border-color: $mycolor3;'>";
echo "<form method=post action=message.php?send=$send>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
(gebruikersnaam)</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
$query = mysql_query("SELECT * FROM users") or die("MySQL error
:".mysql_error());
echo "<select name='send'>";
while($info = mysql_fetch_array($query))
{
echo "<option value='".$info['id']."'>".$nick."</option>";
}
echo "</select>";
echo "<td></tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Onderwerp</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><input name=sendsubject type=text size=53
value='$sendsubject' maxlength=50 style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Bericht</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><textarea name=text cols=40 rows=8 style='border-color:
#000000; border-width: 1;'>$text</textarea></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
name=submit type=submit value='Verstuur' style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
echo "</table>";
echo "</center>";
}

echo "</td>";
echo "</tr>";



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 4:12 PM   #3
Warstar
 
Warstar's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

sorry heb er nog ff een foutje uit gehaald

if (isset ($send))
{
$receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
$receiver_nick_exec = mysql_query ($receiver_nick_query);
$receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
$receiver_nick = $receiver_nick_result["nick"];

if (isset ($submit))
{
$id_query = "SELECT id FROM users WHERE id='$send'";
$id_exec = mysql_query ($id_query);
$id_result = mysql_fetch_array ($id_exec);
$id = $id_result["id"];

if ($id !="" AND $sendsubject != "" AND $text != "")
{
$date = date("Y-m-d_His");
$send_query = "INSERT INTO messages VALUES
('','$myid','$id','$sendsubject','$text','$date',' 0')";
$send_exec = mysql_query ($send_query);
echo '<script>location.href="message.php"</script>';
}
}

echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=2 style='border-style:
solid; border-width: 1; border-color: $mycolor3;'>";
echo "<form method=post action=message.php?send=$send>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
(gebruikersnaam)</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
$query = mysql_query("SELECT * FROM users") or die("MySQL error
:".mysql_error());
echo "<select name='send'>";
while($info = mysql_fetch_array($query))
{
echo "<option
value='".$info['id']."'>".$info['nick']."</option>";
}
echo "</select>";
echo "<td></tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Onderwerp</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><input name=sendsubject type=text size=53
value='$sendsubject' maxlength=50 style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Bericht</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><textarea name=text cols=40 rows=8 style='border-color:
#000000; border-width: 1;'>$text</textarea></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
name=submit type=submit value='Verstuur' style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
echo "</table>";
echo "</center>";
}

echo "</td>";
echo "</tr>";
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 4:12 PM   #4
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

Warstar" <warstar@NSA.com> schreef in bericht
news:b9rliv4d5bgde1rnvgqvplgs7alfu4ft23@4ax.com...
> sorry heb er nog ff een foutje uit gehaald
>


He hartstikke bedankt! T werkt!

Nog 1 klein vraagje misschien (eigenlijk twee):
* Is het ook mogelijk namen op alfabetische volgorde te zetten?
* Om eerste keuze leeg te laten?

"
> if (isset ($send))
> {
> $receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
> $receiver_nick_exec = mysql_query ($receiver_nick_query);
> $receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
> $receiver_nick = $receiver_nick_result["nick"];
>
> if (isset ($submit))
> {
> $id_query = "SELECT id FROM users WHERE id='$send'";
> $id_exec = mysql_query ($id_query);
> $id_result = mysql_fetch_array ($id_exec);
> $id = $id_result["id"];
>
> if ($id !="" AND $sendsubject != "" AND $text != "")
> {
> $date = date("Y-m-d_His");
> $send_query = "INSERT INTO messages VALUES
> ('','$myid','$id','$sendsubject','$text','$date',' 0')";
> $send_exec = mysql_query ($send_query);
> echo '<script>location.href="message.php"</script>';
> }
> }
>
> echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
> cellpadding=0><tr><td>";
> echo "<table cellspacing=0 cellpadding=2 style='border-style:
> solid; border-width: 1; border-color: $mycolor3;'>";
> echo "<form method=post action=message.php?send=$send>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
> (gebruikersnaam)</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
> $query = mysql_query("SELECT * FROM users") or die("MySQL error
> :".mysql_error());
> echo "<select name='send'>";
> while($info = mysql_fetch_array($query))
> {
> echo "<option
> value='".$info['id']."'>".$info['nick']."</option>";
> }
> echo "</select>";
> echo "<td></tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5
> size=1><b>Onderwerp</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2
> align=center><input name=sendsubject type=text size=53
> value='$sendsubject' maxlength=50 style='border-color: #000000;
> border-width: 1;'></td>";
> echo "</tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5
> size=1><b>Bericht</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2
> align=center><textarea name=text cols=40 rows=8 style='border-color:
> #000000; border-width: 1;'>$text</textarea></td>";
> echo "</tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
> name=submit type=submit value='Verstuur' style='border-color: #000000;
> border-width: 1;'></td>";
> echo "</tr>";
> echo "</form>";
> echo "</table>";
> echo "</table>";
> echo "</center>";
> }
>
> echo "</td>";
> echo "</tr>";



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 4:12 PM   #5
Warstar
 
Warstar's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

hier volgt de code met deze veranderingen:

if (isset ($send))
{
$receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
$receiver_nick_exec = mysql_query ($receiver_nick_query);
$receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
$receiver_nick = $receiver_nick_result["nick"];

if (isset ($submit))
{
$id_query = "SELECT id FROM users WHERE id='$send'";
$id_exec = mysql_query ($id_query);
$id_result = mysql_fetch_array ($id_exec);
$id = $id_result["id"];

if ($id !="" AND $sendsubject != "" AND $text != "")
{
$date = date("Y-m-d_His");
$send_query = "INSERT INTO messages VALUES
('','$myid','$id','$sendsubject','$text','$date',' 0')";
$send_exec = mysql_query ($send_query);
echo '<script>location.href="message.php"</script>';
}
}

echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
cellpadding=0><tr><td>";
echo "<table cellspacing=0 cellpadding=2 style='border-style:
solid; border-width: 1; border-color: $mycolor3;'>";
echo "<form method=post action=message.php?send=$send>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
(gebruikersnaam)</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
$query = mysql_query("SELECT * FROM users ORDER BY nick ASC") or
die("MySQL error :".mysql_error());
echo "<select name='send'><option value=''></option>";
while($info = mysql_fetch_array($query))
{
echo "<option
value='".$info['id']."'>".$info['nick']."</option>";
}
echo "</select>";
echo "<td></tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Onderwerp</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><input name=sendsubject type=text size=53
value='$sendsubject' maxlength=50 style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2
align=center><font face=$myfont color=$mycolor5
size=1><b>Bericht</b></font></td>";
echo "<td width=625 align=left bgcolor=$mycolor2
align=center><textarea name=text cols=40 rows=8 style='border-color:
#000000; border-width: 1;'>$text</textarea></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=125 align=left bgcolor=$mycolor2></td>";
echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
name=submit type=submit value='Verstuur' style='border-color: #000000;
border-width: 1;'></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
echo "</table>";
echo "</center>";
}

echo "</td>";
echo "</tr>";






On Sat, 02 Aug 2003 06:00:13 GMT, "Volhouden" <vraag@maar.nl> wrote:

>Warstar" <warstar@NSA.com> schreef in bericht
>news:b9rliv4d5bgde1rnvgqvplgs7alfu4ft23@4ax.com.. .
>> sorry heb er nog ff een foutje uit gehaald
>>

>
>He hartstikke bedankt! T werkt!
>
>Nog 1 klein vraagje misschien (eigenlijk twee):
>* Is het ook mogelijk namen op alfabetische volgorde te zetten?
>* Om eerste keuze leeg te laten?
>
>"
>> if (isset ($send))
>> {
>> $receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
>> $receiver_nick_exec = mysql_query ($receiver_nick_query);
>> $receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
>> $receiver_nick = $receiver_nick_result["nick"];
>>
>> if (isset ($submit))
>> {
>> $id_query = "SELECT id FROM users WHERE id='$send'";
>> $id_exec = mysql_query ($id_query);
>> $id_result = mysql_fetch_array ($id_exec);
>> $id = $id_result["id"];
>>
>> if ($id !="" AND $sendsubject != "" AND $text != "")
>> {
>> $date = date("Y-m-d_His");
>> $send_query = "INSERT INTO messages VALUES
>> ('','$myid','$id','$sendsubject','$text','$date',' 0')";
>> $send_exec = mysql_query ($send_query);
>> echo '<script>location.href="message.php"</script>';
>> }
>> }
>>
>> echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
>> cellpadding=0><tr><td>";
>> echo "<table cellspacing=0 cellpadding=2 style='border-style:
>> solid; border-width: 1; border-color: $mycolor3;'>";
>> echo "<form method=post action=message.php?send=$send>";
>> echo "<tr>";
>> echo "<td width=125 align=left bgcolor=$mycolor2
>> align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
>> (gebruikersnaam)</b></font></td>";
>> echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
>> $query = mysql_query("SELECT * FROM users") or die("MySQL error
>> :".mysql_error());
>> echo "<select name='send'>";
>> while($info = mysql_fetch_array($query))
>> {
>> echo "<option
>> value='".$info['id']."'>".$info['nick']."</option>";
>> }
>> echo "</select>";
>> echo "<td></tr>";
>> echo "<tr>";
>> echo "<td width=125 align=left bgcolor=$mycolor2
>> align=center><font face=$myfont color=$mycolor5
>> size=1><b>Onderwerp</b></font></td>";
>> echo "<td width=625 align=left bgcolor=$mycolor2
>> align=center><input name=sendsubject type=text size=53
>> value='$sendsubject' maxlength=50 style='border-color: #000000;
>> border-width: 1;'></td>";
>> echo "</tr>";
>> echo "<tr>";
>> echo "<td width=125 align=left bgcolor=$mycolor2
>> align=center><font face=$myfont color=$mycolor5
>> size=1><b>Bericht</b></font></td>";
>> echo "<td width=625 align=left bgcolor=$mycolor2
>> align=center><textarea name=text cols=40 rows=8 style='border-color:
>> #000000; border-width: 1;'>$text</textarea></td>";
>> echo "</tr>";
>> echo "<tr>";
>> echo "<td width=125 align=left bgcolor=$mycolor2></td>";
>> echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
>> name=submit type=submit value='Verstuur' style='border-color: #000000;
>> border-width: 1;'></td>";
>> echo "</tr>";
>> echo "</form>";
>> echo "</table>";
>> echo "</table>";
>> echo "</center>";
>> }
>>
>> echo "</td>";
>> echo "</tr>";

>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003
>


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 4:13 PM   #6
Volhouden
 
Volhouden's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Choose a member instead of typ their nickname

"Warstar" <warstar@NSA.com> schreef in bericht
news:3n2nivgfsu3tkmjjo29iu51hblrfq28s2g@4ax.com...
> hier volgt de code met deze veranderingen:


Jaaa... lekker hoorrrrr
Bedankt he!

Groeten Arjan





> if (isset ($send))
> {
> $receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
> $receiver_nick_exec = mysql_query ($receiver_nick_query);
> $receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
> $receiver_nick = $receiver_nick_result["nick"];
>
> if (isset ($submit))
> {
> $id_query = "SELECT id FROM users WHERE id='$send'";
> $id_exec = mysql_query ($id_query);
> $id_result = mysql_fetch_array ($id_exec);
> $id = $id_result["id"];
>
> if ($id !="" AND $sendsubject != "" AND $text != "")
> {
> $date = date("Y-m-d_His");
> $send_query = "INSERT INTO messages VALUES
> ('','$myid','$id','$sendsubject','$text','$date',' 0')";
> $send_exec = mysql_query ($send_query);
> echo '<script>location.href="message.php"</script>';
> }
> }
>
> echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
> cellpadding=0><tr><td>";
> echo "<table cellspacing=0 cellpadding=2 style='border-style:
> solid; border-width: 1; border-color: $mycolor3;'>";
> echo "<form method=post action=message.php?send=$send>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
> (gebruikersnaam)</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
> $query = mysql_query("SELECT * FROM users ORDER BY nick ASC") or
> die("MySQL error :".mysql_error());
> echo "<select name='send'><option value=''></option>";
> while($info = mysql_fetch_array($query))
> {
> echo "<option
> value='".$info['id']."'>".$info['nick']."</option>";
> }
> echo "</select>";
> echo "<td></tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5
> size=1><b>Onderwerp</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2
> align=center><input name=sendsubject type=text size=53
> value='$sendsubject' maxlength=50 style='border-color: #000000;
> border-width: 1;'></td>";
> echo "</tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2
> align=center><font face=$myfont color=$mycolor5
> size=1><b>Bericht</b></font></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2
> align=center><textarea name=text cols=40 rows=8 style='border-color:
> #000000; border-width: 1;'>$text</textarea></td>";
> echo "</tr>";
> echo "<tr>";
> echo "<td width=125 align=left bgcolor=$mycolor2></td>";
> echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
> name=submit type=submit value='Verstuur' style='border-color: #000000;
> border-width: 1;'></td>";
> echo "</tr>";
> echo "</form>";
> echo "</table>";
> echo "</table>";
> echo "</center>";
> }
>
> echo "</td>";
> echo "</tr>";
>
>
>
>
>
>
> On Sat, 02 Aug 2003 06:00:13 GMT, "Volhouden" <vraag@maar.nl> wrote:
>
> >Warstar" <warstar@NSA.com> schreef in bericht
> >news:b9rliv4d5bgde1rnvgqvplgs7alfu4ft23@4ax.com.. .
> >> sorry heb er nog ff een foutje uit gehaald
> >>

> >
> >He hartstikke bedankt! T werkt!
> >
> >Nog 1 klein vraagje misschien (eigenlijk twee):
> >* Is het ook mogelijk namen op alfabetische volgorde te zetten?
> >* Om eerste keuze leeg te laten?
> >
> >"
> >> if (isset ($send))
> >> {
> >> $receiver_nick_query = "SELECT nick FROM users WHERE id=$send";
> >> $receiver_nick_exec = mysql_query ($receiver_nick_query);
> >> $receiver_nick_result = mysql_fetch_array ($receiver_nick_exec);
> >> $receiver_nick = $receiver_nick_result["nick"];
> >>
> >> if (isset ($submit))
> >> {
> >> $id_query = "SELECT id FROM users WHERE id='$send'";
> >> $id_exec = mysql_query ($id_query);
> >> $id_result = mysql_fetch_array ($id_exec);
> >> $id = $id_result["id"];
> >>
> >> if ($id !="" AND $sendsubject != "" AND $text != "")
> >> {
> >> $date = date("Y-m-d_His");
> >> $send_query = "INSERT INTO messages VALUES
> >> ('','$myid','$id','$sendsubject','$text','$date',' 0')";
> >> $send_exec = mysql_query ($send_query);
> >> echo '<script>location.href="message.php"</script>';
> >> }
> >> }
> >>
> >> echo "<table width=750 bgcolor=$mycolor4 cellspacing=0
> >> cellpadding=0><tr><td>";
> >> echo "<table cellspacing=0 cellpadding=2 style='border-style:
> >> solid; border-width: 1; border-color: $mycolor3;'>";
> >> echo "<form method=post action=message.php?send=$send>";
> >> echo "<tr>";
> >> echo "<td width=125 align=left bgcolor=$mycolor2
> >> align=center><font face=$myfont color=$mycolor5 size=1><b>Naar
> >> (gebruikersnaam)</b></font></td>";
> >> echo "<td width=625 align=left bgcolor=$mycolor2 align=center>";
> >> $query = mysql_query("SELECT * FROM users") or die("MySQL error
> >> :".mysql_error());
> >> echo "<select name='send'>";
> >> while($info = mysql_fetch_array($query))
> >> {
> >> echo "<option
> >> value='".$info['id']."'>".$info['nick']."</option>";
> >> }
> >> echo "</select>";
> >> echo "<td></tr>";
> >> echo "<tr>";
> >> echo "<td width=125 align=left bgcolor=$mycolor2
> >> align=center><font face=$myfont color=$mycolor5
> >> size=1><b>Onderwerp</b></font></td>";
> >> echo "<td width=625 align=left bgcolor=$mycolor2
> >> align=center><input name=sendsubject type=text size=53
> >> value='$sendsubject' maxlength=50 style='border-color: #000000;
> >> border-width: 1;'></td>";
> >> echo "</tr>";
> >> echo "<tr>";
> >> echo "<td width=125 align=left bgcolor=$mycolor2
> >> align=center><font face=$myfont color=$mycolor5
> >> size=1><b>Bericht</b></font></td>";
> >> echo "<td width=625 align=left bgcolor=$mycolor2
> >> align=center><textarea name=text cols=40 rows=8 style='border-color:
> >> #000000; border-width: 1;'>$text</textarea></td>";
> >> echo "</tr>";
> >> echo "<tr>";
> >> echo "<td width=125 align=left bgcolor=$mycolor2></td>";
> >> echo "<td width=625 align=left bgcolor=$mycolor2 align=left><input
> >> name=submit type=submit value='Verstuur' style='border-color: #000000;
> >> border-width: 1;'></td>";
> >> echo "</tr>";
> >> echo "</form>";
> >> echo "</table>";
> >> echo "</table>";
> >> echo "</center>";
> >> }
> >>
> >> echo "</td>";
> >> echo "</tr>";

> >
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003
> >

>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
<><> Succeed in Member to Member Program <><> Gary Carpenter Building An Internet Business 0 05-29-2007 3:10 AM
<><> Succeed in Member to Member Program <><> Gary Carpenter Building An Internet Business 0 05-29-2007 3:09 AM
<><> Succeed in Member to Member Program <><> Gary Carpenter Building An Internet Business 0 05-29-2007 3:08 AM
?? Member to Member Program Tips ?? Gary Carpenter Building An Internet Business 0 05-29-2007 2:33 AM
What would you choose? SEOServices Website Advertising Or Marketing 8 05-29-2006 5:44 PM


Featured Websites




All times are GMT +1. The time now is 12:23 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98