Jump to content

loony383

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Everything posted by loony383

  1. In my database I have the collum called ORDER and it has numbers of the order, however when ever I try to order it in my while query it gived me an erorr. $navigation_sql=("SELECT * FROM pages WHERE hidden='0' ORDER BY order ASC"); $navigation_query=mysql_query($navigation_sql); while ($navigation_fetch_array=mysql_fetch_array($navigation_query)) { } This gived me this error
  2. I'm using the following code header('Content-Description: File Transfer'); header('Content-Type: application/force-download'); header('Content-Disposition: attachment; filename='.basename($download_url)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: $get_download3[file_size]'); ob_clean(); flush(); readfile($download_url); to send files to the user. The problem is that when someone tries to download a file with IE (using that) it doesn't send the file, instead IE just tries to download the file but gets nothing, it then opens the program relevant to the file extension and comes up with file errors. In other browsers (firefox and safari) it downloads the file correctly but while downloading it doesn't know how big the file its downloading is until the download finishes. Anyone know how to fix both of these?
  3. I worked it out,. I tried to make it remove the spaces and replace them with underscores in the uploader and it was easier than expected..
  4. That fixed the problem but now I have another. Any documents that have a space in them get corrupted because it doesn't find it. As soon as there is a space in the file name it cuts it off (resulting in it not finding the file and instead just downloads an file full of the error when opened notepad). Anyone know an easy solution to this? (i don't really want to edit the unloader to rename the files with underscores)
  5. I have a filesize of bytes in the database for each file, shall i try replacing the filesize with the number?
  6. There was this: <br /> <b>Warning</b>: filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for http://domain.net/uploads/1235318572/header.png in <b>/home/username/public_html/files/include/cookie.php</b> on line <b>96</b><br /> <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/username/public_html/files/include/cookie.php:96) in <b>/home/username/public_html/files/include/cookie.php</b> on line <b>96</b><br /> ‰PNG
  7. Ok so im using the following header code to send files PHP Code: header('Content-Description: File Transfer'); header('Content-Type: application/force-download'); header('Content-Disposition: attachment; filename='.basename($download_url)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($download_url)); ob_clean(); flush(); readfile($download_url); But whenever a user downloads a file it's corrupted? My website allows users to upload files. I checked the files on the server and they're fine, not corrupted but when the user downloads the file it's corrupted? Users can upload files with any extension to my website. Help anyone?
  8. I dont want to count the number of rows I need the total value of all the values from an collum so say I had a 1 collum table wtht the values 5 4 5 when added up I would get 14 however counding therows would give me 3.
  9. Hi, I'm trying to make an script and in the script I need to have the total of an collum in my mysql table but not for an specefic amount of results I need it to be able to handle unlimited amount of table rows. I have no idea how to do this so if someone can hive a few tips I would be greatful. This has to be done in php/mysql as later on in my script I will need toe total value.
  10. Okay, I worked out the paypal problem now I just need to know how I can execute RCOn commands onto an gameserver.
  11. Depends what they can do in IRC? I don't know I never use IRC.
  12. Hi, I'm trying to make a script that connects to a game server (Valve's source engine) and can execute RCON commands (obviously using the RCON password) and retrieve the information. I have no idea how to do this other than with sockets however I couldn't find and socket tutorials for the source engine. If anyone can help me I would be very greatful. On a side note, does anyone know a good tutorial for paypal purchases (as in once someone has paid it runs a page with specific purchase information.
  13. Hi, I'm trying to make/ am looking for a script (that's free) to provide users with a button to donate, once they have donated they are then returned to the website and the donation amount is stored in a database. I have no idea how i would get this made and the paypal website wasn't much help either. If anyone knows of a free script or can help me make one i would be very greatful.
  14. Im no good at php anymore becuase i stopped for such a long time so how would i use that in my code? i just need a way to change things like 1210198018 into an understandable/readable date and time.
  15. how do i display a date and time from a timestamp $frm3[post_time] is a timestamp how could i set a varible to the date and time using the timestamp?
  16. how can i make $page = $_GET ; set $page to news if there is no page specefied on the url?
  17. I haven't done any php in a while and cant fix this annoying error Parse error: syntax error, unexpected ';', expecting T_WHILE in /home/******/public_html/index.php on line 65 <?php if ($page = index) { include ("forumposts.php"); } else do { if ($page = donate) { include ("donate.php"); } else do { if ($page = team) { include ("team.php"); } else do { if ($page = download) { include ("downloads.php"); } else do { include ("news.php"); } ?>
  18. Is it possible (and if so how) to check if a file in an database has a value set to 1 (value called reported) then if it isnt it sets it to 1 and if it is then it comes up with an error?
  19. I am creating a forum and im trying to align the table into the middle. in IE i somehow did this with text-align and it aligned my whole site (like i wanted) but i cannot seem to get it to align center in Firefox or Safari, heres my css code. i know it is messy but once the forum is finished ill clean up all code. <!--- body { a:link, a:visited, a:active { text-decoration: none} font-family:Verdana, Sans-serif; color; red; font-size: 12px } body { background-image: url(images/background.png); background-repeat: repeat-all; text-align:center; } input,textarea, select,{ color : #000000; font: normal 12px; border-collapse: collapse; border: 1px solid #000000; } /* background-image: url(./images/gradient-background.jpg); /* background-repeat: repeat-x; */ .maintable {border: 1px ; width: 800px; padding: 1px; background-color: navy; align: center ; margin: 2%;} /*main table for forum*/ .regrow {font-family: Verdana,Sans-serif; color: #000000; font-weight: bold; background-color: #FFFFFF;font-size: 14px; margin: 2%;} /*registration row, mainly here for symetry*/ .headline {font-family: Verdana,Sans-serif;font-weight: bold;color: black;background-color: gray; text-align: center ; background-image: (./images/gradient.jpg); background-repeat: repeat-x; font-size: 13px ; margin: 2%;} /*headline row, the first row that says forum name, topics, posts and such*/ .forumrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 14px; margin: 2%;} /*color of the forum rows*/ .mainrow a:link, a:visited, a:active { text-decoration: none; margin: 2%;} .mainrow {font-family: Verdana,Sans-serif; color: #000000;background-color: silver;font-size: 14px; margin: 2%; a:link, a:visited, a:active { text-decoration: none}} /*color of the forum rows*/ .maintables{background-color: #FFFFFF; width: 95%; margin: 2%; padding: 0px; border: 1px solid; cellspacing: no} /*main table for forum*/ ---> EDIT: here is the site live http://www.airboard.impulse82.net
  20. hey, can anyone help me i cant get this update query to work. $updateforum="update ab_forum set numposts=numposts+'1',name=name, forumid=forumid, description=description WHERE forumid='$forumid'"; mysql_query($updateforum) or die("Could not update forum");
  21. so it would see how many categorys there are then it would go through them doing a seperate query for each category until there are no more to query?
×
×
  • 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.