Jump to content
MakeWebGames

Contact Staff Form [FREE]


Draco

Recommended Posts

Copy the following and save it as cstaff.php

This produces a form that has a select list of all members with a user_level greater than 1, the list is ordered by user_level. Subject of mail is set to "Staff contact form".

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

*edit to change filename

Link to comment
Share on other sites

  • 4 weeks later...

Re: Contact Staff Form [FREE]

<?php

include "globals.php";

if($_POST['go'])

{

$to = (int) $_POST['staff'];

$_POST['text'] = strip_tags($_POST['text']);

$msg = str_replace(array("\n"),array("

"),htmlentities($_POST['text']));

mysql_query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'Staff contact form','$msg')",$c) or die(mysql_error());

print "Your mail to the selected staff member has been sent.

Please allow 24 hours for a response to be returned.

Thank You.

";

}

else

{

$q=mysql_query("SELECT * FROM users WHERE user_level > 1 ORDER BY user_level",$c);

print "Contact Staff

 

<form action='cstaff.php' method='post'>

Staff Member: <select name='staff'>";

while($z=mysql_fetch_array($q))

{

print "<option value='{$z['userid']}'>{$z['username']}</option>";

}

print "</select>

 

Message to staff member:

<textarea name='text' rows='7' cols='40'>Send a mail to the selected staff member</textarea>

<input type='hidden' name='go' value='true'>

<input type='submit' value='Send' />

</form>";

}

$h->endpage();

?>

 

Their I Converted it To V2 For You :wink:

Link to comment
Share on other sites

Re: Contact Staff Form [FREE]

 

What version of the code does the mass mail function come in?

Doesn't it have an option to mass mail just staff?

Wouldn't this be the same thing?

By the looks of it, It allows normal members to mail staff. mass mail is only for staff.

Link to comment
Share on other sites

Re: Contact Staff Form [FREE]

 

What version of the code does the mass mail function come in?

Doesn't it have an option to mass mail just staff?

Wouldn't this be the same thing?

This is for players to mail staff.

------------------------------------

is there a missing part i send the pessage then it comes up with cstaff.php with i dod not have wat thd code for that?

You did copy that code and saved it in a file as cstaff.php correct? If not find the line:

<form action='cstaff.php' method='post'>

Change cstaff.php to whatever you named the file

------------------------------------

As for v2 conversion.....I have never seen v2 code, can't help there...

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Re: Contact Staff Form [FREE]

 

V2 converted properly:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

I am 99.9% sure that will work. I own both V1 and V2 so I convert often =)

VS.

 

This is what it should be this works tested on my game.

as Jesse60905 did not convert it propaly i think :roll:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Yeah... I did that when just learning. Looking over it again I do see quite a few places where I messed up. But I still feel special =)

 

Thanks Very Much Jesse60905 works perfectly. +1 :mrgreen:

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...