Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


ginerjm last won the day on April 30

ginerjm had the most liked content!

Community Reputation

192 Excellent

About ginerjm

  • Rank
    Handball player
  • Birthday 03/23/1952

Profile Information

  • Gender
  • Location
    Voorheesville NY

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ginerjm


    Oh - the suspense!! So what IS this error on the screen? Remember - we can't see your screen.... PS This: $sqli="INSERT INTO nametable (firstname, lastname) VALUES ('$_POST[fname]','$_POST[lname]')"; if (!mysqli_query($sqli,$con)) would be better this way (indices need to be in quotes!): $q = 'insert into nametable (firstname, lastname) values(' . "$_POST['fname']" .', ' . "$_POST['lname']" . ')'; if (!mysqli_query($q, $con)) ......
  2. ginerjm

    Array help

    Not sure I agree with Notion's post. First - line 1 seems irrelevant. And from my look at your post OP, you have an array of individual arrays followed by an array of individual elements with numeric keys. When you add the second array to the first array - how do you want to "fit" them in? I think you will quickly run into duplicate keys and start losing matched data as I see it. Do you want each element of array #2 to be a single entry in the first array? If so how do you want to handle the key of this new element? Or do you want to add each element of array 2 as a one-element array in array 1 with a new sequentially assigned index for that new array item in array1?
  3. ginerjm

    Wordpress plugin with Redirect to URL

    Using a form to gather the inputs is the expected way. Your php script needs to validate the form's inputs to be sure the user has provided proper values. Then you can use the header call to follow thru on whatever url you have built from this. Good idea - show us the code that gathers the form inputs and then what you do to build the url and call it. That would be a great help to anyone here that wants to help you. Otherwise I don't know what you are expecting from the forum. Error messages are a good thing to provide as well.
  4. ginerjm

    Best & Most Secure way for Form Validation

    But what about the "form validation" that you put in your topic's title? You're not doing any of that yet? The things being discussed so far have nothing to do with 'form validation'.
  5. ginerjm

    Best & Most Secure way for Form Validation

    So - what have you done to get rid of the errors? Do you have any to show us? Them and the specific lines involved?
  6. ginerjm

    Best & Most Secure way for Form Validation

    Read up on using "prepared queries". You can find it in the php manual under the mysqli or PDO interface. mysqli: http://php.net/manual/en/mysqli.prepare.php PDO: http://php.net/manual/en/pdo.prepare.php BTW - what you have shown is not really form validation. It is merely preparation of the values to be inserted into a query. Validation should have already occurred by the time your code gets to this point. You need to check that values actually exist and that they are "valid" - hence the term validation. Numeric entries need to have actual numbers in them and be in the range of expected values. Code entries (eg, 'Y' or 'N') need to be correct; the method needs to be the correct one for your form (is it a POST?) and you need to be sure that all of your expected inputs are present. If not, return the form and its contents to the user to try again. PS - W3schools is definitely NOT the place to be learning from.
  7. ginerjm

    Call to undefined function (beginner)

    Once again the failure to RTFM is the cause of one's problem. Look up ereg in the official PHP manual. Sure I could be extremely helpful and give you the link (not!) except I believe you need to practice using the manual.
  8. ginerjm

    file name change help

    IMHO - you s/b looking for how to make ONE config file work for multiple MAC addresses. Not the way you are doing it.
  9. ginerjm

    PHP convert English date to French date

    Have you read the manual on the date() function? And read up on what those formatting characters are for? So simply re-arrange the format chars to get what you want. Right now you are getting January 01, 1992 out of your date call. What do the French use for a date?
  10. ginerjm

    file name change help

    Will all of these 'new' files have the exact same contents?
  11. ginerjm

    Changing sorting order in pagination class

    "order by NULL" What is that? Is "NULL" a table column name or what?
  12. ginerjm

    Get the Form to mail to two emails

    As Requinex says - make some changes and try it out and then show us what is failing. I, for one, am not sure what kind of example you need since I only posted one line of your code and pointed out its weakness. BTW - while it is allowed and does in fact work (although at an extra expense I'm sure) PHP will work more efficiently if you wrap your array indices in quotes. An example of that is simply: $array['index']
  13. If, as you seem to be saying, all you want to do is "remove commas", why not use the str_replace function??? You can replace any comma with a null character (simply '') and write out a new file (perhaps) with the modified lines. Plus - this code is really not doing much. You do a loop thru the file (that is currently not producing anything) and then you check if you are at eof. What's that for?
  14. ginerjm

    Get the Form to mail to two emails

    Ok - so do you see what's wrong with this line? mail(email, 'Contact Form', $body, $headers ); } The word "email". What is that actually? If you had error checking turned on you probably would be seeing a message. Actually, I'm surprised the script even runs with that in it. (Must be defaulting to a constant that is not defined.) You need a variable there or an actual string (text in quotes). The better way might be to add your second address to the headers as a CC: which you could look up in the PHP manual. That way you just have one email going out. (Or a BCC if you want to hide it)
  15. ginerjm

    Manipulate a single value in an array

    Hmmm.... You have been given (as you say) a task to complete. Sounds like homework of a sort to me. So - why have you been given this task? I assume to help you in a learning process. Why then is your attempt at learning simply to post to this forum (and others?) looking for the answers instead of doing your (hopefully) assigned reading? As Cyberobot has said - What have you read? If you don't think reading is a good thing or if you are one of the many wanna-be programmers I see on forums such as this who say that they do better with videos and such and don't learn well from reading(!), then let me suggest that programming is not for you. Go back to video games or whatever keeps you occupied if you can't be bothered to learn how to read and experiment with a true learning process. Every one of the languages I learned in my 40 years of IT involved reading a manual as well as other tutorials and class materials as well as hours of practice and thought. If that doesn't interest you then you are on the wrong path. (My day to be hard I think.)

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.