Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1008343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:45:27+00:00 2026-05-16T08:45:27+00:00

if(!isset($_POST[‘JoinFaction’])) { echo ‘<form method=post action=’.$page_name.’><dl id=sample class=dropdown align=left>’ .'<dt><a href=#><span>Recruiting Factions [‘.$numrows.’]</span>’ .'</a></dt><dd><ul>’;

  • 0
if(!isset($_POST['JoinFaction'])) {

echo '<form method="post" action="'.$page_name.'"><dl id="sample" class="dropdown" align="left">'
    .'<dt><a href="#"><span>Recruiting Factions ['.$numrows.']</span>'
    .'</a></dt><dd><ul>';

while($faction_re = mysql_fetch_array($sql)){
echo '<li><a href="#">'.$faction_re['f_name'].''
    .'<span class="value">'.$faction_re['f_id'].'</span></a></li>';         
}

echo '</ul></dd></dl></td>'
    .'<td class="faction_bgcolour" align="center"><input type="image" '
    .'name="JoinFaction" value="JoinFaction" width="54" height="45" '
    .'src="images/global/game/faction/join_faction.png" /></td></form>';
  //get output as a variable to use in later code
  echo $selected_faction = '<span id="result"></span>'; 

} else { $selected_faction = '<span id="result"></span>';

echo '<div class="faction_text">Joined: '.$selected_faction.'.</div>';

}

when I:

echo $selected_faction;

in the if statement, it gets the right faction value (i’m using custom jquery drop down boxes by the way here).

The problem is that this id is not being passed to the else statement where i can update the database. I’m really not sure how I would pass the id on to the else statement.

echo $selected_faction is blank in the else clause

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:45:27+00:00Added an answer on May 16, 2026 at 8:45 am

    You’re going to need to send the content of that div back to your server with AJAX.

    You could start learning here: http://api.jquery.com/category/ajax/

    I suppose a good starting point might be: http://api.jquery.com/jQuery.post/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<body> <?php if(isset($_POST['vendor_add_submit'])){ //INSERT INTO DB unset( $_POST['vendor_add_submit'] ); } ?> <form method=post action=<?php
I have the following code: <form action= method=POST> <?php $count = isset($_POST['count']) ? $_POST['count']
In form validating,I find such codes if(isset($_POST['ajax']) && $_POST['ajax']==='login-form') { echo CActiveForm::validate($model); Yii::app()->end(); }
I have: if(isset($_POST['submit'])) { if (empty($name)) { echo'<span class=error>ERROR: Missing Name </span><br/>'; } else
now i have this form post script <? if(isset($_POST['baslik'])) { $sql = INSERT INTO
I have 2 files : index.php, form.php. form.php: <?php if (isset($_POST['submit'])){ echo OK; //
<?php if(isset($_POST['btnSubmit']) and $_GET['action'] == Add) { $Users->copyPostData(); $Users->_password(md5($_POST[password])); $Users->_status(0); $Users->_apikey(md5(ONE@:.$_POST[uname].:@STEP)); $userNum = $Users->checkUserExist($Users->_username());
I am trying to get the following code to work: if (isset($_POST['file'])){ if(file_exists($_POST['file'])){ echo
I have the following code presently: if(isset($_POST['Movie'])) { $check = $_POST['Movie']; echo (left angle
The problem is when I use $fname = isset($_POST['fname']) ? $_POST['fname'] : 'sample'; die($fname);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.