Strats Posted July 4, 2009 Posted July 4, 2009 I play a lot of games, and it's always the same thing with gangs. You can make a nice gang description ... fine But when you go and change it you have to copy and paste in into the box. I'm sure there is a way to keep the description in the box for it to be add to. Can any one do this? I have looked about and can't find how to do it. Quote
Haunted Dawg Posted July 4, 2009 Posted July 4, 2009 Re: Gang Description Idea You would look for something like.. <textarea name='gangdesc' rows='x' cols='x'></textarea> change that to.. <textarea name='THESAME' rows='x' cols='x'>".$gangdata['gangDESC']."</textarea> Quote
Strats Posted July 4, 2009 Author Posted July 4, 2009 Re: Gang Description Idea It worked once for me lol But back to normal now, My text is different than yours. print "Current Description: {$gangdata['gangDESC']} <form action='yourgang.php?action=staff&act2=desc' method='post'> Enter the new description. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'></textarea> <input type='submit' value='Change' /></form>"; Mines V2 Quote
Lithium Posted July 4, 2009 Posted July 4, 2009 Re: Gang Description Idea <textarea name='vp' cols='40' rows='7'>".$gangdata['gangDESC']."</textarea> Quote
Strats Posted July 4, 2009 Author Posted July 4, 2009 Re: Gang Description Idea Closer, Now I need to get it in the box. It shows up under the box. Is there anything wrong with this : function gang_staff_desc() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid ) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangDESC='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Faction description changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Description: {$gangdata['gangDESC']} <form action='yourgang.php?action=staff&act2=desc' method='post'> Enter the new description. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'></textarea> ".$gangdata['gangDESC']."</textarea><input type='submit' value='Change' /></form>"; Quote
Haunted Dawg Posted July 4, 2009 Posted July 4, 2009 Re: Gang Description Idea Maybe try.. function gang_staff_desc() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid ) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangDESC='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Faction description changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Description: {$gangdata['gangDESC']} <form action='yourgang.php?action=staff&act2=desc' method='post'> Enter the new description. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'>".$gangdata['gangDESC']."</textarea><input type='submit' value='Change' /></form>"; Quote
Strats Posted July 4, 2009 Author Posted July 4, 2009 Re: Gang Description Idea Got it sorted. Thank you both for your help :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.