Jump to content

only one

Members
  • Posts

    437
  • Joined

  • Last visited

    Never

Everything posted by only one

  1. it connects further up the page
  2. <?php if (isset($_POST["clan"])) { $username = $_POST["user"]; if($clan==NULL) { echo "A field was left blank."; }else{ $checkuser = mysql_query("SELECT username FROM clanapps WHERE username='$username'"); $username_exist = mysql_num_rows($checkuser); if ($username_exist>0) { echo "You have already applied"; }else{ $query = "INSERT INTO clanapps (`username`, `clan`) VALUES('$username','$clan)"; mysql_query($query) or die(mysql_error()); echo "you succefully applied for $clan"; }}} ?>
  3. i got a upload code, see if you make sense of this, u can edit it itno your own <?php echo('Upload image<br><br>'); $path = "uploads/"; $max_size = 5000000; if (!isset($HTTP_POST_FILES['userfile'])) exit; if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { if ($HTTP_POST_FILES['userfile']['size']>$max_size) { echo "The file is too big<br>"; exit; } if (($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/png")) { if (file_exists($path . $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists, try calling it a different name.<br>"; exit; } $res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path . $HTTP_POST_FILES['userfile']['name']); if (!$res) { echo "upload failed!<br>"; exit; } else { echo "upload sucessful<br><br>"; } echo "File Name: ".$HTTP_POST_FILES['userfile']['name']."<br>"; echo "File Path: <a href=uploads/".$HTTP_POST_FILES['userfile']['name']." TARGET=_BLANK>uploads/".$HTTP_POST_FILES['userfile']['name']."</a><br>"; echo "File Size: ".$HTTP_POST_FILES['userfile']['size']." bytes<br>"; echo "File Type: ".$HTTP_POST_FILES['userfile']['type']."<br>"; echo "<img src=uploads/".$HTTP_POST_FILES['userfile']['name']." width=200 height=250><br>"; include("cons.php"); $avatar2 = ""; mysql_query("UPDATE `users` SET `avatar` = 'uploads/".$HTTP_POST_FILES['userfile']['name']."' WHERE `username` = '$user';"); echo "Profile Pic updated"; } else { echo "Wrong file type<br>"; exit; } } $my_file = $HTTP_POST_FILES['userfile']['name']; ?> this is very simple, should work
  4. heres my code $checkuser = mysql_query("SELECT username FROM clanapps WHERE username = '$username'"); $username_exist = mysql_num_rows($checkuser); heres the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/d-pures.freehostia.com/pages/Apply.php on line 9
  5. um thats the wrong function $num=mysql_num_rows($available_flights); try that
  6. wtf is the point with that if with the row variable?
  7. or you could make a form, then echo "<body bg-color=$bgcolor">
  8. that would be more javascript than php....
  9. <?php while ($row_rs_history == mysql_fetch_assoc($rs_history)) { ?> <table width="450" align="center" cellpadding="1" cellspacing="1"> <tr> <td width="50%"><div align="left"><?php echo $row_rs_history['issue']; ?></div></td> <td width="50%"><?php echo strftime('%d %B %Y', strtotime($row_rs_history['update_date'])); ?></td> </tr> <tr> <td colspan="2"><div align="left"></div> <div align="left"></div> <div align="left"> <hr /> </div></td> </tr> </table> <?php } ?> try it with 2 = signs
  10. use session_start(); function inside your framed page
  11. two mail functions should work as far as i know
  12. <?php if (isset($_POST['submitted'])) { require_once ('home/virttcom/public_html/VHDdb/mysql_connect.php'); $id_num = $_POST['id_num']; $get_url = mysql_query("SELECT url FROM Tours WHERE id_num='$id_num'"); $url = mysql_result($get_url, 0); header("Location: $url"); exit(); } ?> you dont the the "/" beofre home in your requireonce function...
  13. i need help with bbcaode, any 1 got a tut?
  14. either use cookies or save it in the database with their ip.....
  15. <?php if($field_title==NULL|$field_descr==NULL|$field_keywords==NULL){ echo "the forum again"; }else{ echo "Sucessfull"; } ?>
  16. echo this ... <meta http-equiv="refresh" content="0;url=the location"> this doesnt always work the quickest but its all you can do
  17. the header(); function has been disabled by your webhost, used to happen to me
  18. thats simple, make it echo the forum if all the things = NULL else if they were succesfully posted echo seucesfull just a thing to point you in the right direction
  19. put your session_start(); at the top of the page
  20. is the table width on 100%?
  21. http://time-2-design.com/tutorials.php?type=php all youll ever want to know
×
×
  • 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.