Jump to content

Tandem

Members
  • Posts

    251
  • Joined

  • Last visited

    Never

Everything posted by Tandem

  1. Thanks yonta, that appears to be the fix.
  2. When i try to use is_finite i get the error: Warning: is_finite() expects parameter 1 to be double, string given in C:\Pro..... on line 99 my code is [code]<? if (($submit == "Send!") && (!empty($get_proper_name)) && (is_finite($amount))) { ...qureies and stuff here.... } ?>[/code]
  3. I'm having a problem with buffer overflow. I'm not actually all that familiar with buffer overflow, so forgive/correct me if i get anything wrong. On my site i have a section where you can input a number and that updates the database, but you have a maximum number. If your input number is higher than your maximum number the transaction with the database is blocked. However somebody has told me that there is a way to get around this and it seems to work too. You enter a massively long sequence of numbers, in this case he did tens of thousands or numbers, and it somehow bypasses the if statement that blocks it from happening. Also after you have entered the number it echo's "You successfully entered (number) as your number", but using the buffer overflow method it says "You have successfully entered $inf as your number". How can i stop this from happening? Thanks in advance for any replies.
  4. Tandem

    updating

    I found out why. I was using apostrophes in the things that i was trying to update the database with, and i wasn't adding slashes. Funny how it was never a problem with the old server.
  5. I just moved my site to a new server, and i'm having a couple of MySQL problems. Whenever i try to update a record of TEXT type with a long string of text, via mysql_query(), especially one with a lot of new lines in it, it just doesn't update. It appears to work fine via phpmyadmin. Anyone have any ideas as to why this might be happening? Thanks.
  6. Tandem

    false

    Ok cool, thanks for the replies.
  7. Tandem

    false

    I just tried: [code]$blah = false; echo "$blah";[/code] and got no output, so yeah i guess it must be empty.
  8. Tandem

    false

    if i set a variable to false like this: [code]$blah = false;[/code] Does that effectively 'empty' the variable? Or does it literraly make it "false"? Or something else?
  9. I'm quite sure you don't need to close it or anything, and i'm not sure it's possible either. All your php is server side, so nobody can get your passwords unless they have access to your server. (Someone please correct me if i'm wrong)
  10. What if i name the form rather than the submit input? Is there anyway to get a value for the form that has been submitted?
  11. If i do that, then people could fill in a form and press the submit button from a different form and it would still process their input.
  12. I'm using a javascript file with my site that requires that i do not name my submit inputs, but i need to get the submit value so that my script executes the correct pieces of code depending on which submit input has been pressed, because some of my pages have several forms on them. Is there any way to find which submit has been pressed, or which form it was in or something like that without me having to name my submit inputs and get there values with $_POST['submitnamegoeshere']; ? Thanks in advnace for any help, and please say if you need more details.
  13. Post the error and your code, nobody can help you when nobody knows the problem.
  14. Tandem

    if help

    I'm having some trouble with something.... Here is some code i wrote just to give an example: [code] <html> <head> </head> <body> <? $output = $_POST['output']; if ($output == "nothing") { $output = 0; } if ($output == "something") { echo"<br>Hello"; } echo <<<HERE <form method="POST" action="forms.php" name="f"> <input type="text" name="output" value=""> <input type="submit" name="submit" value="Submit!"> </form> HERE; ?> </body> </html>[/code] In this form if you enter the word 'something' into the text input it will echo "Hello". If you enter the word 'nothing' it will set the the variable $output to 0, but then for some reason "Hello" is echoed. Why is this, and what ways are there to stop this?
  15. [code] $blah = $_POST['blah']; if ($blah > 6) { $action = "something"; } else if ($blah < 7) { $action = "nothing"; } [/code] You mean something like that?
  16. Make sure you have a field for the time in your table, and then just do "UPDATE TABLE SET TIME=NOW() WHERE ..."
  17. When i'm retrieving form data, i usually use one of the following: [code]$blah = $_POST['blah'];[/code] or [code]$blah = $_GET['blah'];[/code] What other ways are there of retrieving form data, and if they work differently at all, how do they work? Just want to expand my knowledge of php a bit.
  18. On my test server where the file() and file_get_contents function won't work, the allow_url_fopen is set to On. Should that be set to off or...?
  19. Oh wait, they weren't working on my local test server, but when i uploaded them to my real host they worked fine. I'll do the allow_url_fopen thing for my test server. Thanks alot for the help.
  20. It's the exact code above, totally on it's own.
  21. Thanks for your responses. I tried the code out, and i get the following error: Warning: file_get_contents(https://daopay.com/svc/numgen?appcode=41970&orderno=yes&format=hash&country=GB&price=1.0) [function.file-get-contents]: failed to open stream: Invalid argument in C:\...... on line 2 Can't figure out why myself as i don't really understand file_get_contents() very well.
  22. We need lots of details. There is no way anyone can possibly help you going by that.
  23. The site below contains just some plain text. https://daopay.com/svc/numgen?appcode=41970&orderno=yes&format=hash&country=GB&price=1.0 I want to be able to take the digits next to "number=" and next to "orderno=" and be able to use them in a script. As of now i have not even attempted this as i really don't know where to start, and would be grateful for any help, thanks.
  24. Sorry i'm not sure about that, however i would quite like to know how too, so i would also appreciate it if anybody could explain.
×
×
  • 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.