Jump to content

libinaz

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by libinaz

  1. okay, I have at least the images loading onto the page with the artists name's and website as a link in the names. I opted to go with the names on the right of the image. Now for the pagination. I am thinking of no more than 6 rows per page. If anyone knows of a way to do this...cool...any help is appreciated. I am off to phpfreaks tutorials for some pagination lessons. [code]<?php $query = "SELECT artist_photo, artist_lastname, artist_firstname, artist_website FROM artists ORDER BY artist_lastname ASC"; $result = mysql_query($query) or die("There was a problem with the SQL query: " . mysql_error()); if($result && mysql_num_rows($result) > 0) { $i = 0; $max_columns = 2; while($row = mysql_fetch_array($result)) { if($result) { $artist_photo=$row['artist_photo']; $artist_lastname=$row['artist_lastname']; $artist_firstname=$row['artist_firstname']; $artist_website=$row['artist_website']; extract($row); if($i == 0) echo "<tr>"; if($artist_photo != "" && $artist_photo != null) echo "<td><img src=\"$artist_photo\"></td>"; echo "<td><a href='$artist_website'>$artist_firstname $artist_lastname</a>"; if(++$i == $max_columns) { echo "</tr>"; $i=0; } } } } if($i < $max_columns) { for($j=$i; $j<$max_columns;$j++) echo"<td>&nbsp;</td>"; } echo"</tr>"; ?>[/code]
  2. Using the above code I get a "Parse error: syntax error, unexpected T_STRING in /home/.macintoshdryer/etc on line 13 Line 13 is while ($row = mysql_fetch_array($result)) { [code]<?php ini_set('error_reporting', E_ALL); ini_set('display_errors', true); require_once('dbconnection.php'); $conn = db_connect();   if (!$conn)     return 'Could not connect to database server - please try later.'; $query = "SELECT artists_lastname, artist_firstname, artist_website, artist_photo FROM artists ORDER BY artist_lastname ASC"; $result = mysql_query($query); $count = mysql_num_rows($result); $x = 0; while ($row = mysql_fetch_array($result)) {         $data1[$x] = $row[0];         $data2[$x] = $row[1];         $x++; } ?>[/code]
  3. Honestly, I think I am just too intimidated by this. I have a database that contains images, names and websites of  people. I just want to query the database, and have 20 distinct records per page, 4 columns across and each record contains three rows (the first row contains the images, the second row contains the first_name last_name with their website as a link and the third row is just a spacer between.) I have tried numerous things, but all have been quite unfruitful and very ugly. If anyone can help me with the initial query and how to add them to the table, I might be able to figure this out. None of the scripts, tutorials I have found seem to be simple enough for what I am looking for. pretty much i know what I want the outcome to be, this is two rows (6 table rows) of records: [code]    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="protext">                       <tr>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                       </tr>                       <tr>                         <td><a href="http://www.theirsite.com">Person's first_name last_name with the website as                           the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                       </tr>                       <tr>                         <td colspan="4">&nbsp;</td>                         </tr>                       <tr>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                         <td><img src="http://www.mysite.com/artists/image1.jpg" width="126" height="158"></td>                       </tr>                       <tr>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                         <td><a href="http://www.theirsite.com">Person's first_name                             last_name with the website as the link</a></td>                       </tr>                       <tr>                         <td colspan="4">&nbsp;</td>                       </tr>                     </table> [/code] my database schema is [code]CREATE TABLE `artists` (   `artist_key` int(11) NOT NULL auto_increment,   `artist_firstname` varchar(100) NOT NULL,   `artist_lastname` varchar(100) NOT NULL,   `artist_website` varchar(200) NOT NULL,   `artist_photo` varchar(200) NOT NULL,   `date_added` date NOT NULL,   PRIMARY KEY  (`artist_key`) )[/code] Any help is much appreciated. I think I am just at a major total block and intimidated greatly by this.
  4. My display function doesn't work. It works if it's called up on its own, without the other if/else, but doesn't work through the display function. It doesn't seem to get the value of $institutionname. Is there something I need to post/do for it to get that variable? mydisplay.php [code] <?php function display_contact_form() { ?> <?php $query_billemailw = "SELECT * FROM users_tbl WHERE institutionname = '$institutionname' AND expired < 3 ORDER BY bill_email ASC"; $billEmailw = mysql_query($query_billemailw) or die(mysql_error()); $row_member4 = mysql_fetch_assoc($billEmailw); ?> <form name="formactive" method="post" action="removeinactive.php"> <input name="institutionname" type="hidden" value="<?php echo $institutionname; ?>"> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"> <tr> <td bgcolor="#CCCCCC"><table width="100%" border="0" align="left" cellpadding="4" cellspacing="0" class="bodytext"> <tr class="bodytextbold"> <td colspan="4" class="header"> <?php echo $institutionname; ?> Active Members<br> <span class="bodytext">As the institution contact you can remove Members from the Active Member list. These would be members who are no longer associated with your institution, or members who no longer wish to be Active. To remove them, select the checkbox to the left and select the Remove Active Members button.</span> <p><span class="bodytext"> If you accidently removed a membership you can reactivate                 them using the Review Deactivated Members below, or you can, <a href="../contact.html">contact                 Us</a>.</span></p> </td> </tr> <tr> <td width="5%"></td> <td width="36%"><strong>Email Address</strong></td> <td width="59%"><strong>Member Name</strong></td> </tr> <?php do { ?> <tr> <td><input type="radio" name="bill_email" value="<?php echo $row_member4['bill_email']; ?>"> </td> <td><?php echo $row_member4['bill_email']; ?></td> <td><?php echo $row_member4['lname']; ?>, <?php echo $row_member4['fname']; ?></td> </tr> <?php } while ($row_member4 = mysql_fetch_assoc($billEmailw)); ?> </table> </td> </tr> <tr> <td><input type="submit" name="Submit" value="Remove"> </td> </tr> <tr> <td>&nbsp;</td> </tr> </table> </form> <form name="form5" method="post" action="removeinactive.php">   <input name="institutionname" type="hidden" value="<?php echo $institutionname; ?>">   <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">     <tr>       <td bgcolor="#CCCCCC"><table width="100%" border="0" align="left" cellpadding="4" cellspacing="0" class="bodytext">           <tr class="bodytextbold">             <td colspan="4" class="header">               <?php $query_billemaile = "SELECT * FROM users_tbl WHERE institutionname = '$institutionname' AND expired > 2 AND  expired < 5 ORDER BY bill_email ASC"; $billEmaile = mysql_query($query_billemaile) or die(mysql_error()); $row_member5 = mysql_fetch_assoc($billEmaile);; ?>               <?php echo $institutionname; ?>'s Inactive Members<br>               <span class="bodytext">These are members who have not renewed membership               for the 2006/2007 Member year. You can email your members and let               them know to <a href="https://www.naaco.info/membership06/start.php">sign               up</a></span> or if you know they will not be members this year,               you can move them to the Deactivated Member's List.               <p><span class="bodytext"> If you accidently removed a membership,                     or need assistance, <a href="../contact.html">contact Us</a>.</span></p>             </td>           </tr>           <tr>             <td width="5%"></td>             <td width="36%"><strong>Email Address</strong></td>             <td width="59%"><strong>Member Name</strong></td>           </tr>           <?php do { ?>           <tr>             <td><input type="radio" name="bill_email" value="<?php echo $row_member5['bill_email']; ?>">             </td>             <td><?php echo $row_member5['bill_email']; ?></td>             <td><?php echo $row_member5['lname']; ?>, <?php echo $row_member5['fname']; ?></td>           </tr>           <?php } while ($row_member5 = mysql_fetch_assoc($billEmaile)); ?>         </table>       </td>     </tr>     <tr>       <td bgcolor="#CCCCCC"><input type="submit" name="Submit" value="Remove">       </td>     </tr>     <tr>       <td>&nbsp;</td>     </tr>   </table> </form> <table width="100%" border="0" cellspacing="0" cellpadding="5">   <tr>     <td bgcolor="#CCCCCC" class="header"><form name="form2" method="post" action="inactivemembers.php">                       <input name="institutionname" type="hidden" value="<?php echo $institutionname; ?>">                     Select to                     <input type="submit" name="Submit3" value="Review all Deactivated Members">     </form></td>   </tr> </table> <?php }; ?> [/code] Where it is called up from [code] <?php $query_contact = "SELECT * FROM users_tbl WHERE bill_email = '$billEmail'"; $institutioncontact = mysql_query($query_contact) or die("Problem with the query: $query_contact<br>" . mysql_error()); $row2 = mysql_fetch_assoc($institutioncontact); if (isset($row2['institutioncontact']) && $row2['institutioncontact']=="Yes") { display_contact_form(); } else { $query_wwcontact = "SELECT * FROM users_tbl WHERE institutioncontact = 'Yes' AND institutionname = '$institutionname'"; $institutionwwcontact = mysql_query($query_wwcontact) or die("Problem with the query: $query_contact<br>" . mysql_error()); $wwrow = mysql_fetch_assoc($institutionwwcontact); if (isset($wwrow['institutioncontact']) && $wwrow['institutioncontact']=="Yes") { echo 'Your institution contact is ' . $wwrow['lname']; echo', ' . $wwrow['fname']; echo', ' . $wwrow['bill_email']; } else { echo 'Your institution currently does not have an institution contact. Please select if you would like to become the contact.<br>'; echo '<select name="institutioncontact" class="formbodytext" id="select" tabindex="1">'; echo '<option value="" selected>Institution Contact</option>'; echo '<option value="Yes">Yes, make me the institution contact</option>'; echo '<option value="No">No</option>'; echo '</select>'; } } ?> [/code]
  5. I am trying to get this to work using the functions. My page loads fine, but the display isn't showing up. In my form I have the require_once('mydisplays.php'); and [code] <?php $query_contact = "SELECT * FROM users_tbl WHERE bill_email = '$billEmail'"; $institutioncontact = mysql_query($query_contact) or die("Problem with the query: $query_contact<br>" . mysql_error()); $row2 = mysql_fetch_assoc($institutioncontact); if (isset($row2['institutioncontact']) && $row2['institutioncontact']=="Yes") { echo '<?php display_contact_form() ?>'; } else { echo '<?php display_contact_person() ?>'; } ?>[/code] and mydisplays.php [code] <?php function display_contact_form() { ?> contact information <?php }; function display_contact_person() { ?> contact person <?php }; ?>[/code]
  6. The following code will be placed on a users page. If they are the contact then they will be able to remove inactive members. If they are not the contact, then they get a link to the contact person in the event they want to be removed. The first part works...sort of. I need the first section to 'show' only if they are the institution contact, else then it shows who the contact is. 1. Do I need to echo each and every line? ie. echo '<form name="form1" method="post" action="removeinactive.php">'; 2. What happens when I get where the other queries are? Should I just place all of the queries at the top of the page? 3. Is there another way to do this, like if you are the contact, echo '<?php display_contact_form() ?>'; } else { echo '<?php display_contact_person() ?>'; and use an include? any help is appreciated. this is driving me nuts. [code] <?php $query_contact = "SELECT * FROM users_tbl WHERE institutioncontact = 'Yes' AND institutionname = '$institutionname'"; $institutioncontact = mysql_query($query_contact) or die("Problem with the query: $query_contact<br>" . mysql_error()); $row = mysql_fetch_assoc($institutioncontact); if (isset($row['institutioncontact']) && $row['institutioncontact']=="Yes") { ?>               <form name="form1" method="post" action="removeinactive.php">                 <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">                   <tr>                     <td bgcolor="#CCCCCC"><table width="100%" border="0" align="left" cellpadding="4" cellspacing="0" class="bodytext">                         <tr class="bodytextbold">                           <td colspan="4" class="header"><?php $query_billemaile = "SELECT * FROM users_tbl WHERE institutionname = '$institutionname' AND expired < 4 ORDER BY bill_email ASC"; $billEmaile = mysql_query($query_billemaile) or die(mysql_error()); $row_member5 = mysql_fetch_assoc($billEmaile); $totalRows_billEmaile = mysql_num_rows($billEmaile); ?>                               <?php echo $institutionname; ?>'s Active Members<br>                               <span class="bodytext">You can remove ineligible                               members from the Active Members list here. To remove                               them, select the checkbox to the left and select                               the 'Remove' button.</span>                               <p><span class="bodytext"> If you accidently removed                                   a membership, or need assistance, <a href="../contact.html">contact                                   NAACO</a>.</span></p>                           </td>                         </tr>                         <tr>                           <td width="5%"></td>                           <td width="36%"><strong>Email Address</strong></td>                           <td width="59%"><strong>Member Name</strong></td>                         </tr>                         <?php do { ?>                         <tr>                           <td><input type="radio" name="bill_email" value="<?php echo $row_member5['bill_email']; ?>">                           </td>                           <td><?php echo $row_member5['bill_email']; ?></td>                           <td><?php echo $row_member5['lname']; ?>, <?php echo $row_member5['fname']; ?></td>                         </tr>                         <?php } while ($row_member5 = mysql_fetch_assoc($billEmaile)); ?>                       </table>                     </td>                   </tr>                   <tr>                     <td bgcolor="#CCCCCC"><input type="submit" name="Submit" value="Remove">                     </td>                   </tr>                   <tr>                     <td>&nbsp;</td>                   </tr>                 </table>               </form>               <table width="100%" border="0" cellspacing="0" cellpadding="5">                 <tr>                   <td bgcolor="#CCCCCC"><form name="form2" method="post" action="inactivemembers.php">                       <input name="institutionname2" type="hidden" value="<?php echo $institutionname; ?>">                       <span class="bodytext">Select to</span>                       <input type="submit" name="Submit" value="Review all Deactivated Members">                     </form>                   </td>                 </tr>               </table> <?php   } else { echo 'Your institution contact is ' . $row['lname']; echo', ' . $row['fname']; echo '<a href="mailto:'.$row['bill_email'].'"> Email Your Contact</a>'; } ?>[/code]
  7. It still doesn't show any errors. It just refreshes. I removed the echo's in the form and now, when it refreshes, nothing is in the form. here is the full code: [code] <?php session_start(); // Set the page title and include the HTML header. require_once ('db_fns.php'); // Connect to the database. $conn = db_connect();   if (!$conn)     return 'Could not connect to database server - please try later.'; if (isset($_POST['submit'])) { if (empty($_POST['bill_email'])) { $billEmail = FALSE; echo '<p><font color="red" size="+1">You forgot to enter your email!</font></p>'; } else { $billEmail = escape_data($_POST['bill_email']); } if (empty($_POST['secretquestion'])) { $squestion = FALSE; echo '<p><font color="red" size="+1">You forgot to select a secret question!</font></p>'; } else { $squestion = escape_data($_POST['secretquestion']); } if (empty($_POST['secretanswer'])) { $sanswer = FALSE; echo '<p><font color="red" size="+1">You forgot to enter your secret answer!</font></p>'; } else { $sanswer = escape_data($_POST['secretanswer']); } if ($billEmail && $squeston && $sanswer) { $query = "SELECT bill_email, secretquestion, secretanswer FROM users_tbl WHERE bill_email='$billEmail' AND secretquestion='$secretquestion' AND secretanswer='$secretanswer'"; $result = mysql_query ($query) or die(mysql_error()); $row = mysql_fetch_array ($result, MYSQL_NUM); if ($row) { $billEmail = $row[0]; $squestion = $row[1]; $sanswer = $row[2]; } else { echo '<p><font color="red" size="+1">The submitted user information does not match those on file!</font></p>'; $billEmail = FALSE; } } if ($billEmail) { // Create a new, random password. $p = substr ( md5(uniqid(rand(),1)), 3, 10); // Make the query. $query2 = "UPDATE users_tbl SET passwd=PASSWORD('$p') WHERE bill_email='$billEmail'"; $result2 = mysql_query ($query2)  or die(mysql_error());; // Run the query. if (mysql_affected_rows() == 1) { // If it ran OK. // Send an email. $body = "Your password to log into NAACO has been temporarily changed to '$p'. Please log-in using your email and this password. At that time you may change your password to something more familiar."; mail ($email, 'Your temporary password.', $body, 'From: me@mysite.com'); echo '<h3>Your password has been changed. You will receive the new, temporary password at the email address with which you registered. Once you have logged in with this password, you may change it by clicking on the "Change Password" link.</h3>'; exit(); } else { // If it did not run OK. // Send a message to the error log, if desired. $message = '<p><font color="red" size="+1">Your password could not be changed due to a system error. We apologize for any inconvenience.</font></p>'; } mysql_close(); // Close the database connection. } else { // Failed the validation test. echo '<p><font color="red" size="+1">Please try again.</font></p>'; } } // End of the main Submit conditional. ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="userscss.css" rel="stylesheet" type="text/css"> </head> <body> <table width="512" border="0" cellpadding="6" cellspacing="0" bgcolor="#FFFFFF">   <tr>     <td><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">       <table width="500" cellpadding=2 cellspacing=0 bgcolor="#FFFFFF">         <tr>           <td colspan="2" class="bodytext"><span class="header">NAACO Password               Retrieval</span><br>                   <span class="membertext">If you have forgotten your password,                   please enter your username, your secret question and your secret                   answer. Your password will be sent to your email address.</span></td>         </tr>         <tr>           <td width="35%" class="bodytext">&nbsp;</td>           <td width="65%">&nbsp;</td>         </tr>         <tr class="membertext">           <td class="bodytext">Enter your username (eMail address)</td>           <td>             <input name="bill_email" type="text" class="bodytext" size="30">           </td>         </tr>         <tr class="membertext">           <td>&nbsp;</td>           <td>&nbsp;</td>         </tr>         <tr class="membertext">           <td class="bodytext">What was your secret question (select)</td>           <td>             <select name="secretquestion" size="1" class="bodytext" id="select4" tabindex="30">               <option value="" selected>Select one</option>               <option value="What is your favorite color">What is your favorite               color</option>               <option value="What is your favorite sport">What is your favorite               sport</option>               <option value="What is your mothers maiden name">What is your mothers               maiden name</option>             </select>           </td>         </tr>         <tr class="membertext">           <td>&nbsp;</td>           <td>&nbsp;</td>         </tr>         <tr class="membertext">           <td class="bodytext">What is the answer to your secret question</td>           <td><input name="secretanswer" type="text" class="bodytext" size="30">           </td>         </tr>         <tr class="membertext">           <td>&nbsp;</td>           <td>&nbsp;</td>         </tr>         <tr align="left" class="membertext">           <td colspan=2><input type="submit" name="Submit" value="Submit"> </td>         </tr>       </table>     </form></td>   </tr> </table> </body> </html> [/code]
  8. Yes, the page just refreshes and shows the information posted. Where do I put the mysql_error()? I did change the billEMail and the quotes, it still just refreshes.
  9. Hi, I am trying to set up a reset password which isn't working. in all, it just refreshes. what code and where do I put it for debugging? forgot_password.php: [code] <?php if (isset($_POST['submit'])) { // Handle the form. require_once ('db_connect.php'); if (empty($_POST['bill_email'])) { $billEmail = FALSE; echo '<p><font color="red" size="+1">You forgot to enter your email!</font></p>'; } else { $billEmail = escape_data($_POST['bill_email']); } if (empty($_POST['secretquestion'])) { $squestion = FALSE; echo '<p><font color="red" size="+1">You forgot to select a secret question!</font></p>'; } else { $squestion = escape_data($_POST['secretquestion']); } if (empty($_POST['secretanswer'])) { $sanswer = FALSE; echo '<p><font color="red" size="+1">You forgot to enter your secret answer!</font></p>'; } else { $sanswer = escape_data($_POST['secretanswer']); } if ($billEmail && $squeston && $sanswer) { $query = "SELECT bill_email, secretquestion, secretanswer FROM users_tbl WHERE bill_email='$billEmail' AND secretquestion='$secretquestion' AND secretanswer='$secretanswer'"; $result = @mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_NUM); if ($row) { $billEmail = $row[0]; $squestion = $row[1]; $sanswer = $row[2]; } else { echo '<p><font color="red" size="+1">The submitted user information does not match those on file!</font></p>'; $billEmail = FALSE; } } if ($billEmail) { // Create a new, random password. $p = substr ( md5(uniqid(rand(),1)), 3, 10); // Make the query. $query = "UPDATE users_tbl SET passwd=PASSWORD('$p') WHERE bill_email=$billEMail"; $result = @mysql_query ($query); // Run the query. if (mysql_affected_rows() == 1) { // If it ran OK. // Send an email. $body = "Your password to log into NAACO has been temporarily changed to '$p'. Please log-in using your email and this password. At that time you may change your password to something more familiar."; mail ($email, 'Your temporary password.', $body, 'From: me@mysite.com'); echo '<h3>Your password has been changed. You will receive the new, temporary password at the email address with which you registered. Once you have logged in with this password, you may change it by clicking on the "Change Password" link.</h3>'; exit(); } else { // If it did not run OK. // Send a message to the error log, if desired. $message = '<p><font color="red" size="+1">Your password could not be changed due to a system error. We apologize for any inconvenience.</font></p>'; } mysql_close(); // Close the database connection. } else { // Failed the validation test. echo '<p><font color="red" size="+1">Please try again.</font></p>'; } } // End of the main Submit conditional. ?> [/code] and then the html form in the body with the action: [code] <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">[/code] any help is appreciated. thanks
  10. HI, can I have a page that a user selects and it checks the database if a condition exists...if that condition exists it refreshes to one page...if that url does not exist, then it goes to another page? something similar to [code]$institutionname = $_POST["institutionname"]; $query_payment = "SELECT * FROM institution_tbl WHERE institutionname = '$institutionname' and expired = '0'"; $institutionypayment = mysql_query($query_contact) or die("Problem with the query: $query_payment<br>" . mysql_error()); $row = mysql_fetch_assoc($institutionpayment); if (isset($row['expired']) && $row['expired']=="0") { { // redirect to affiliate page ?> <meta http-equiv="refresh" content="0;URL=https://mysite.com/membership/paid.php"> <?php }  [/code]
  11. [quote author=AV1611 link=topic=99917.msg393783#msg393783 date=1152403088] if $row[0]=='YES'{      //show your stuff here      } else     {      //show some other stuff      } [/quote] can someone help me write this code properly. [code] <?php $query_contact = "SELECT * FROM student_tbl WHERE institutioncontact = 'yes' AND institutionname = '$institutionname'";   $institutioncontact = mysql_query($query_contact) or die(mysql_error());   $row = mysql_fetch_assoc($institutioncontact);   if ($row['institutioncontact']=='yes'){ Your institution contact is echo $row['institutioncontact'];     } else     { Your institution currently does not have an institution contact. Please select if you would like to become the contact. <select name="institutioncontact" class="formbodytext" id="select" tabindex="1">                             <option value="" selected>Institution Contact                             <option value="Yes">Yes, make me the institution contact                             <option value="No">No                             Contact </select>      }          ?>[/code]
  12. Hi, I have a query that selects 'yes' from a field. If there is no 'yes' then I need to show something...if there is a Yes, then I just need to show who the yes belongs to. here is the query [code] <?php $query_contact = "SELECT * FROM students_tbl WHERE institutioncontact = 'yes' AND institutionname = '$institutionname'"; $institutioncontact = mysql_query($query_contact) or die(mysql_error());?>[/code] here is what I want to show if there is not a 'yes' [code]                           Member Contact Information: You currently do not have an institution contact, please select.<br>                                       <select name="institutioncontact" class="formbodytext" id="select" tabindex="1">                                         <option value="" selected>Select One                                         <option value="Yes">Yes,                                     make me the Institution Contact                                         <option value="No">No, we already have an Institute                                     Contact                                       </select>[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.