boionfire81 Posted April 6, 2016 Share Posted April 6, 2016 Ok, so my players will be selecting an alliance. Angels, Demons, or Self. I need to know how to create the if statements. ie. if alliance = angels show page_part 1, elseif alliance = demons show page_part 2, else show page_part 3. Also, checking to see if exists. Similar to donator if donator = >0 but for db queries. As each side will vary upon their benefits. Quote Link to comment Share on other sites More sharing options...
Zettieee Posted April 6, 2016 Share Posted April 6, 2016 if (somthing = something) { do things} Quote Link to comment Share on other sites More sharing options...
Dominion Posted April 6, 2016 Share Posted April 6, 2016 ^ What he said. http://php.net/manual/en/control-structures.if.php Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 6, 2016 Share Posted April 6, 2016 Just to add to Dom's post: http://php.net/manual/en/language.operators.comparison.php Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 14, 2016 Author Share Posted April 14, 2016 I'm working with the factions mod. fixed most errors. Now I'm on to the search function which is the last. Here's the code global $ir,$db,$c,$userid,$h; if (!$_POST['name']) { print "<form action='factions.php?step=search' method='post'> <b>Search by Keyword</b> Insert the keyword that you'd like to search for Factions: <input type='text' name='name'> <input type='submit' value='Search'></form> <hr width='90%'><a href='factions.php'>Back</a><hr width='90%'>"; } Parse error: syntax error, unexpected 'name' (T_STRING), expecting ']' Quote Link to comment Share on other sites More sharing options...
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.