Search results

  1. W

    Passing vars from parent to iframe

    I'd need to see the code behind loadintoIframe() in order to see how it's loading the page to be sure of this. However, I believe that just changing iframe2.php to iframe2.php?name=thename would be adequate. Then the script for iframe2.php should have the variable $_GET['name'].
  2. W

    [Urgent Help] Can anyone helpme whit Font Format in PHP? I can pay whit credits ^^

    Re: [Urgent Help] Can anyone helpme whit Font Format in PHP? I can pay whit credits ^ Alright, I just sent you the download link and information on what you may need to change. I've improved on it quite a bit since I made that first one. I think it turned out pretty good ;-). Tell me if you...
  3. W

    Disable Renavigation to same page ??

    That html will work, but you'd still need a little php to determine if the user has been there before. There are two reasonable ways to do this. One would be to use sessions, which is rather easy, but users can get them cleared by logging out or closing their browser. You could set the sessions...
  4. W

    Javascript code not working as required..

    Count is a local variable here, and even if it wasn't it's still being reset to 0 every time. You need to modify it a bit to something like this: var count=0; function chngepwd() { if(count>3) { alert("Number of attempts allowed have been used.Please wait!!!")...
  5. W

    Count Down

    That code looks alright for the most part. The only thing is that the OP said that after 20 minutes, the db is cleared. This sounds to me like a cron job rather than something that would rely on the clients. In this case it would be a good idea to have php store the timestamp of the last...
  6. W

    Need just a tiny bit of help =]

    Random numbers can be generated with mt_rand(min, max). So to get a random number from 1 to 10, you'd use mt_rand(1, 10). However, this function doesn't take into account previous calls to it. So if you use it 5 times with 1 and 10 as the arguments, it's possible that each time it will return 1...
  7. W

    how do i do this? (php)

    If they're all in the same directory and there are no other files in there other than them, then you can use rmdir() to remove the entire directory.
  8. W

    how do i do this? (php)

    If that's the exact php code you're using, then you're missing the $ in $i++. If not, are you sure the files exist? You use '.php' in the code, but you mentioned '.txt'. Also, if these files need to be created every so often with new data, then you might want to consider leaving them and just...
  9. W

    [Urgent Help] Can anyone helpme whit Font Format in PHP? I can pay whit credits ^^

    Re: [Urgent Help] Can anyone helpme whit Font Format in PHP? I can pay whit credits ^ I'm rather confused with what you're talking about. The code you provided isn't valid php code. To me, it looks like part of a call to imagettfbbox() since that's the only function I can think of which takes a...
  10. W

    Quick question: PHP/Javascript syntax problem

    First of all, Javascript isn't Java. Second, I think your problem may be that you're putting single quotes within single quotes. Try changing the echo statement to: echo "<td> <a href=\"javascript:loadintoIframe('myframe', 'iframe.php')\">" . $row['name'] . "</a> </td>"; I took the...
  11. W

    Help a Novice out..... (PERL script from HTML)

    I believe you need to specify the content type before you do any outputting. Try this: #!/usr/bin/perl print "Content-Type: text/html\n\n"; print "Hello World"; exit; If it still doesn't work, then it might be that you haven't chmoded it to 755, which allows execution of the script.
  12. W

    HTML and CSS problem

    You need to get rid of the spaces between the number and px in '400 px' and '15 px' in the .box and .inbox classes respectively. Remember that spaces can be used to separate values for sub-properties. Such as 'padding: 0px 1px 2px 3px;' to set padding-top/-right/-bottom/-left. Also, you need to...
  13. W

    Php/MySQL user authentication help

    You don't have to do anything yourself other than write the code. PHP can connect to the db and edit/retrieve data on the spot once you have created a script to do that. So if you wanted to make a processing script for user login requests, and store the user's id in their session data to...
  14. W

    Php/MySQL user authentication help

    Thanks, tnl2k7, but that wasn't what I was confused about. I was confused with what he was referring to by 'root' in the context of our discussion. Since in my post before his, I didn't mention a root user, only that the user he creates needs to have proper access. But regardless, I was never...
  15. W

    Php/MySQL user authentication help

    I'm not sure what you mean by 'root' in this context. However, yes, as long as the mysql user you create has access to the db(s) you want to use in your script, then you can use the login details for that account in the mysql connection function call.
  16. W

    Php/MySQL user authentication help

    No, I meant a db user. Sorry for the misunderstanding. You should be able to view/create mysql users from your cpanel in the "MySQL Databases" section. One db user can be used for every script as long as the user has adequate access to the databases you want to deal with in the script. So if...
  17. W

    Php/MySQL user authentication help

    If you're using MySQL, then you need to change those MS SQL function calls to their corresponding MySQL functions(which is basically just changing mssql to mysql). You can view all the MySQL functions here: http://www.php.net/manual/en/ref.mysql.php And yes, every time you need to access data...
  18. W

    Auto down counter

    I think php would take the decrement operator as an implicit cast, but it's probably a good idea and good practice to explicitly cast it anyway. Also, I would modify the code a little bit further to flock() the file. <?php //Relative path to your chosen file here $filename = "stock.txt"; //Url...
  19. W

    Javascript to change iframe url

    Try it with a name attribute on the iframe. Like this: <div id="menu"> <iframe id="menu" name="menu" src="incl/menu.html" frameborder="0" allowtransparency="true"></iframe> </div> Also, you shouldn't give two elements the same id in a page.
  20. W

    Simple php script fails

    The 500 error is the strange part. The 404 is just the server saying that it couldn't find the file which should be loaded when a 500 error occurs, so that doesn't really have anything to do with it. Regardless, I highly doubt it's the file which is causing this itself. I would suggest looking...
Top