Jump to content

the_oliver

Members
  • Posts

    364
  • Joined

  • Last visited

    Never

Everything posted by the_oliver

  1. Hello. Im having some trouble making an iFrame expand to 100%. The code im using is the following: <td width="1" valign="top"><img src="images/vertical_devide.jpg" width="2" height="250" /></td> <td width="600" align="left" valign="top"> <!--- DATA FRAME ---> <iframe id="DETAILFrame" name="DETAILFrame" style="width:600px; height:100%; border: 0px" src="dhost.php?id=0"></iframe> <!-- END ---> </td> However i still get a scroll bar on the side. (after about 600px i guess). The strange thing is that if i change <img src="images/vertical_devide.jpg" width="2" height="250" /> to <img src="images/vertical_devide.jpg" width="2" height="900" /> the iframe will expand to fill its contents (which is never more then about 850px. Not quite shore where im wrong! Thanks!
  2. Ah, So maybe you should use a database. If when a user succesfully logs in, there sesion id is added to a database. The on every page you check the users session id against the database. If its not in there then they canot see the page. Then as you increase the security, you can check it agains the users name, stored in a cookie, or in the session.
  3. Hit it on the nail!! A stuppid error! Many Thanks....
  4. Can you post the headers code your putting into email?
  5. It is lost when the redirect is done. (through header("Location: edit.php"); ).
  6. yes. It is at the top of a page which is included in every file.
  7. How? You simply put the redirect inside the if statment. You will have to check that the user is logged in for every other page viewed, but there is no way round that.
  8. session_start() is started very first thing when the user loggs in. On a later page to enter a value: $_SESSION['tid'] = $_POST['tid']; To retreave it: echo $_SESSION['tid']; It works first time. However if a user then submits the form, it is send else where, and when it is sent back having failed that validation, there is no longer a value in $_SESSION['tid']; Thanks.
  9. $time is how long it should be untill your page refreshes. So if its 0 then it will refresh instantly. It its 10 it will do so in 10 seconds.
  10. Hello, If i store a variable in the session eg: $_SESSION['something'] it is lost between page changes. Is this normal? Is there a way round this? Many Thanks
  11. Use headers. See the top of this forum section. If however you have already sent output you could use an HTML refresh.
  12. Thats a very open ended question realy! There best thing to do would be to work out what you think the problems may be, and then try to iliminate them. For example are you running a large number of cron tasks, or backups between those times? If its a VPS it could be something to do with the other sites on the server. It could be that one of them is using up large amount of bandwith or the servers capacity between those times. On thing that you could try is as root running, between those hours the comand "top". (just type it into the command line). This will show you what resorces are being used by what. You may for example see that appache is suddenly requiring a large amount of proccing power between these times. Another good option would be to check through the logs. Persionaly i would start by checking with your hosts. It could well be that they use the bandwith for backups at those times. Hope that helps alittle.
  13. Hello, Im wondering if there is a way, through a php script, to create a zip file of the contents of a folder? E.g. the web user would submit a form, and after a bit of validation, a zip file would be created, and a download forced. How could would i go about creating the zip file through php? (Im hosted on a Windows mashine) Thanks for your thoughts.
  14. (starting at row 27) $query_send = "select * from template where cid = '" . $_SESSION['cid'] . "' and tid = '" . $_SESSION['tid']. "'"; $result_send = @mysql_query($query_send, $connection); $row_send = mysql_fetch_array($result_send); if ($row_send[type] == 't') { $text = nl2br($_SESSION['text_body']); $text = str_replace("<br />\n<br />","<br />", $text); echo $text; } else { echo $_SESSION['output']; } Thanks!
  15. Hello, Im getting an error: This is becaue one of the feilds thats being selected form the database contains a '. All of the data that i ask for in the select still arives and works, i just dont want the warning! Is there a way to deal with this? (I need it to be in the datbase as ' not \' or the html code for ') Thanks
  16. Hello. When i enter the code <input name="ename" type="text" id="ename" size="30" maxlength"50" value="<\"\>"> the text feild is shown with <\ in it and then straigh after it "> is shown (outside the text feild). Is there a way round this? Its so that these charictors can be returned to the form, an the user told to remove them. Thanks
  17. Hello, Im using this code forom the code snipits bit of the forum, but cant work out how to enter the file name? I tried $file = $_REQUEST['/var/www/html/file.mp3'] but it gave me the error: Can anyone help? Many Thanks. <?php // force to download a file // ex, ( [url=http://localhost/php/download.php?file=C:/Apache]http://localhost/php/download.php?file=C:/Apache[/url] Group/Apache2/hongkong.php ) // hope this can save your time :-) $file = $_REQUEST['file']; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=".basename($file)); header( "Content-Description: File Transfer"); @readfile($file); ?>
  18. Thank you, So when using that can i put the file outside the webservers directory? (so as to stop the whole anyone gessing the url thing!). And specify where the file is in this bit: $file = $_REQUEST['file']; so it could be $file = $_REQUEST['/stor/file.someting']; Excuse my ignorance!
  19. Hello, Im trying to do something where by when some one pays for something, and the payment is confirmed they are able to download a file. The bit i cant work out is how to let them download the file. I could just give them the link only once they have paid, however this would meen that they could give anyone the link. So i need a way to make downloads only possible by people who have paid, not anyone who knows the URL. Can anyone suggest anything? Thanks!
  20. Its not realy a security thing. I just would need them to type into the feild rather then pasting in. So as to avoid strange charictors creaping in! - Ta!
  21. Hello, I was wondering if it is possible to stop people from using copy and paste to fill a text feild? Thanks!
  22. So the actual value in the database is the funny squair thing? If so you need to do the replace on the way into the database. Or find out which ASCII number the funny symbole is and do a search replace on that. Unfortunatly your likley to have to replace any entries like that (already in the database) manualy.
  23. Are both the servers inside the same network? Relly the only soltion to the domain problem would be to have a router with a static ip, redirecting requests. Some what complex and expencive. As for the MySQL you could have a scrip that would dump the current database to a file, FTP it to the other server, and a schedualed task on the other server that checks for new files, and restorse them to its database when they appear. Same for the webfiles. Your probably looking at some form of .vbs script, although i cant be sure. If they are in the same network the best option would be some kind of cluster, but again, advanced expencive and complex! What ever route you chose its not going to be easy!
  24. You need to set up a rule on your router telling it to forword connections on port 80 to your servers internal IP address. If when you type in the address you get a responce (eg a web page appears) then port 80 is not blocked. In your case if you get your router so it is not blocked! You should be aware that trying to accress that domain name from inside your network may not work. (might just hang in confusion). You need to test it from somewhere else.
×
×
  • 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.