Jump to content

simcoweb

Members
  • Posts

    1,104
  • Joined

  • Last visited

Everything posted by simcoweb

  1. So you want it to just display ALL instances of Duct Tape as one item in a list?
  2. if((a == b) || (b == c)){ echo "execute your code here"; } else { echo "nothing equalled anything"; } if((a == b) and (b == c)) { echo "execute your code here"; } else { echo "nothing matched so nothing done"; }
  3. I would assume you already have people registering as a member on your site? If not, there's no way they'd know who is who.
  4. Try this: <?php include 'database.php'; $sql = "SELECT * FROM userstable"; $results = mysql_query($sql) or die(mysql_error()); echo "<table border='1'>"; echo "<tr> <th>userid</th> <th>name</th> </tr>"; while($row = mysql_fetch_array( $results )) { echo "<tr><td>"; echo $row["userid"]; echo "</td><td>"; echo $row["name"]; echo "</td></tr>"; } echo "</table>"; ?>
  5. You might want to try it this way: include 'auth.php'; if (isset($_POST['submit'])){ $UserName = $_POST['name']; $Password = $_POST['pass']; $Result = Login($UserName, $Password); }else{ $Result = 4; };
  6. You would use an 'if' statement something like: if($_POST['username'] = 'admin') { header("Location: adminpage.php"); } if($_POST['username'] = 'staff01') { header("Location: staff01page.php"); } if($_POST['username'] = 'staff02') { header("Location: staff02page.php"); }
  7. I use this for multiple columns that are determined by the number of entries. Modify the HTML output a bit to suit your column headings and it should work. The references to the links, of course, would need to be modified as well: // run query $sql = "SELECT * FROM subcategories WHERE cat_id='2'"; $results = mysql_query($sql) or die(mysql_error()); // display results $totalColumns = 2; $i = 1; echo "<table border='0' cellpadding='2'>"; while ($row = mysql_fetch_array($results)){ if ($i == 1) echo "<tr>"; echo "<td>"; echo "<a href='getcat.php?subcat_id=". $row['subcat_id'] . "'>" . $row['subcat_name'] . "</a>"; echo "</td>"; if ($i == $totalColumns) { echo "</tr>"; $i = 0; } $i++; } echo "</table>";
  8. Ok, you have this: name="Submit" but in my code I had: name="submit" with lower case S. Change it to uppercase and give it a try.
  9. Well, then let me ask you a question. What is the name of your 'submit' button in your form code?
  10. Simply by changing your query. The WHERE is looking for a value from $division right now. If you change it to $division_id then the value would be passed from the form.
  11. First, create a form that has the checkbox selections. Then you'd build the query to write either to a file or database, your choice. This wouldn't be an 'upload' script. Simply gathering data and storing it.
  12. First, this line is wrong. Your WHERE doesn't match the variable you've named: $sql = "SELECT * FROM `f2007_scheduling` WHERE division='$division' ORDER BY date ASC"; should be: $sql = "SELECT * FROM `f2007_scheduling` WHERE division='$division_id' ORDER BY date ASC";
  13. You can try this: <input style="width:200px;" name="userfile" type="file" id="menu_textbox" value="<? if(isset($_POST['submit'])) echo $_POST['userfile']; ?>">
  14. This line in your form output is missing a double quote and period to close out your value: $output .=" <input type=checkbox name=PICTURES value=".$row['fileName']." />".$row[picTitle]; should be: $output .=" <input type=checkbox name=PICTURES value=".$row['fileName']." />".$row[picTitle].";
  15. Insert..you mean insert into a database? You wouldn't need a 'for' loop to do that.
  16. Let me see if i'm clear on your question....you want someone to write the code for you?
  17. You might try doing the query this way: $sql = "INSERT INTO parasite (parasitename, parasitefrom, parasitegenre, parasitedescription, parasiteremoval) VALUES ('$parasitename', '$parasitefrom', '$parasitegenre', '$parasitedescription', '$parasiteremoval')";
  18. Normally those are determined using a set of keywords associated with the pics. Having a database field for either a description or keywords or both would do the trick.
  19. One thing right off the bat: $checkfilename= "select id from $table where file='".$POST['file']."';"; Take off the last "; You duplicated it.
  20. <font face="Arial" size="2" color="#FFFFFF">Username</font>
  21. Might be a silly question, but is your page named with a .php extension?
  22. Couldn't you pass the info like: http://www.yoursite.com/filename.php?item1=bozo&item2=clown&item3=bigtop
  23. Question: Even though they may change order, the question id's or field names don't change. Correct?
×
×
  • 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.