Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. if ($row['copyright'] <> null) echo "Copyright Imagem: " . $row['copyright'] . "</p>"; If that helps.
  2. ok - need more input, but first you need more coding. 1 - please use the tags here to encase your code so it is more readable. 2 - you need to close your form 3 - you do realize that your inputs using 'beton[]' as the name attribute are returning an array in the $_POST array? Meaning you already have an array, so I don't know what you mean by "turn it into [an] array". 4 - your foreach to grab the contents of the beton[] array, could be entirely replaced with: $ints = $_POST['beton'] to create an array of all the checkboxes named beton. Same with your 'amount[]' array from $_POST. 5 - Do you need to validate the inputs from beton and amount to ensure that they are one-to-one, meaning you have a bet AND amount for each choice(?) ? You have a pseudo query in here - perhaps if you flesh it out we can see what your data looks like. What you have given us is very hard to figure out. And your html form shows stuff that you have not declared for us to see, so hard to make sense of it. Maybe laying out in English what you are doing will help us to see what you see.
  3. THIS is a much more informative post than your first. Do you see how much differently you present yourself this time? Your first post (2nd on this site?) showed you in a much more "needy" light. You presented (as I said) two lines of code and some html and asked for help in writing a query that you apparently had not even attempted. Typical newbie post asking forum members to write the code that the poster is too lazy to even attempt. So - do you have something to show now that you have been provided some input from others?
  4. So - you've written all of two lines of PHP code and now you want us to write the rest? Perhaps you should begin by learning how to write php. Go thru a tutorial or two online and learn instead of starting off by asking others to do your work. Everybody - EVERYBODY - is a complete "noob" at one time. The way to lose that nametag is by learning and it involves some - gasp! - work.
  5. Because when I see the call to a query function I expect it to be executed every time thru which is definitely not something I would want to do each time thru a loop.
  6. That seems to be a very contrary syntax. The first time into the foreach the query is executed, and the following times it is not? Not very intuitive....
  7. Besides the other comments, your first 'query' is confusing. You have a query call inside a foreach - not sure that is a valid thing to do. Normally one calls the query and gets a result var and THEN uses the looping to process the records in the result var.
  8. oops - just noticed a typo. The keyword in my code should be 'VALUES' not 'VALUE'
  9. First you need to sanitized/validate your input before attempting to place it in your db. To extract the array values from your POST array: $values = ''; foreach($_POST['firstname'] as $nm) { if ($values == '') $values .= "VALUE ('$nm')"; else $values .= ",('$nm')"; } Then modify your query statement to use $values in place of your existing values, etc.
  10. is your command (open) formatted correctly - per the manual? Seems odd to be getting an ip addr in the message.
  11. You don't reference a valid table name in your query as far as your code shows. You don't check to ensure the query statement actually ran. Is your username possibly a multi-word value? You don't include it in quotes in your test, which btw is meaningless since your query could only possibly obtain a match already. You turned on error checking but you don't display them. Are you checking your error log to see if there is a message there? Since this is in test still and not open to the public yet, try turning on 'display_errors' so you can see them as you test.
  12. Not sure what the post from Jayson... was about. As for the error message - show us line 94 so that we may point you in the right direction.
  13. In your desperation (funny how people get desperate when trying something new), did you read thru all the posts in the PHP manual describing many potential problems?
  14. Then let's see the code. Properly tagged of course.
  15. Did you turn on 'display_errors'?
  16. You'll get better response if you provide the code. I, for one, don't click on people's links to (supposed) code stored elsewhere, let alone a zip file. May I first suggest turning on php's error checking to see if an error is causing your script to abort?
  17. Generally you get content from a page via a POST or GET that sends that page's input elems to the receiving script. That script takes its input and decides what to do with it, such as posting a db or making some decision as to what 'page' to send back to the client. You should really do some reading on how web apps work and how to navigate between the server and the client (user) and back. Forms and their input elements (tags) are a major part of the communication process.
  18. Out of curiosity, why do you need to get something from a page this way? Why not just output the specific value in an <input> tag that is stylized so as to appear as plain text (if necessary) and have the id on that? Wrap the table inside the form tag and let it come to your php script as part of the $_POST array. Then process it. Or write a JS function to process the id contents on submit and let the JS place the data into a hidden input element, to then be picked up again in the $_POST array.
  19. Apparently you don't want to make the effort to learn here, since I've told you exactly what to do. You haven't taken the time to examine what I described, have you? I'll help those who attempt to help themselves. You are just a copier. Sorry. Good Bye.
  20. Yes you can do an echo. As for how to get the $response var to that script I'd have to see how you are getting to it. Show how your pass control to index.php from the login process
  21. Why not do the same thing where you echo $response in the login.php in the index.php script.?
  22. Read thru your code but don't know what you are trying to do. Can you at least describe your goal. And - please define what you mean by page and form, just to be sure we agree.
  23. When you say only so much shows up, do you mean the rest is completely unavailable, or that the size of the image has increase so that one must scroll to view the full contents?
  24. Do we get part of your tuition for teaching you what you are supposed to be learning?
  25. Some very nice choices, but 'twas much more to the point: Bite The Bullet.
×
×
  • 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.