-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
Way too much code to just talk about the db structure and how it's used......
-
The "from" address is used by the mail program as the legitimate "from address" of the email being sent. So - you have to set that header value to the address you want. But - you must use an address that your mail server recognizes, usually one from the same domain and not one that an anonymous user provides to you in a form field.
-
What is this line doing for you? $from = '<Form Submitter>'; I don't recognize this syntax. Apparently you are just setting your header to show a string as the from argument and not an email address.
-
As Kicken has already said - if YOUR code is doing the updates that you are trying to monitor afterwards, then by all means alter your code to send you a notification via email or with a simple text file on your server that tells you when and what changed.
-
That is what I was asking. If your api is providing data your function needs to feed that back (return 'true' or 'false') so that the script can avoid having an error.
-
Simple question now. Who is doing the changing? Is it a script that you have control of or access to ? I'm sure you can see where I am going here.
-
So if your function isn't doing the loop, what purpose will it serve if it doesn't return some kind of answer? Or as Barand already told you - why don't you find out why the function ISN'T finding an array result? Could be a hidden problem.
-
Where's the "var_dump" call? Or have you jumped past that and are checking for a valid result before calling the loop? If skipping the loop what are returning to the caller of this function?
-
'One column'?? You mean a single column on a single record or that singled column across all of the records in that table? And how do you know that it has changed? Are you saving the original value somewhere in your session or in another record?
-
Can you explain better what you mean by "changed database"? A database is a set of tables of which your server/account may have several. Are you talking about a chang e to a single table? How do you tell if a table has been changed? Query every single record and compare it to something saved?
-
email address is domain account user name @ the server name
ginerjm replied to Chrisj's topic in PHP Coding Help
So what happened to using the info I posted on how to get the right paths? Sorry - wrong topic. Thought I showed you how to use a DOCUMENT_ROOT to base your relative paths off of. -
email address is domain account user name @ the server name
ginerjm replied to Chrisj's topic in PHP Coding Help
So - You had no success. Care to tell us why/what/how? Did your send give you an error or not? -
Get by tag name may not be specific enough to get the right info. Try using an id perhaps? Passed in the call to the test() function
-
A little bit neater coding of the same thing: for( $i=0; $i < 5; $i++) { echo "<button id='btn' onclick='test()'>Hello</button>"; }
-
Perhaps my fault. I tend to make bad assumptions when trying to understand posts. I see how you describe you intent to use a checkbox would fit into that design.
-
HTH!! PS - using a checkbox (or something resembling one) does not make a good presentation for the user IMHO. A "submit" action should be some kind of button or link that the user is familiar with and recognizes as his course of action. A checkbox is just that - a check that should have an accompanying label indicating what the user is "checking" or "selecting" on. Certainly not a "form submittal".
-
Just use a form for each row with a submit button to update that row only. Then have a separate form from all the others (outside of the html table?) that has a submit to do your next task.
-
You could also do this with a separate form embedded into each row of the html table. Then you could skip the arrays and just use the same names on all rows with a submit button for each. That is if you wanted to do the updates on each row as they occur and not wait for the user to update everything... (which would NOT work in that case).
-
You are putting a value of '1' in every checkbox/row currently. Why not the reset value as the 'value' attribute instead? Then you could compare the value submitted against the original reset value (in a hidden array field)for each checkbox to see if they still match and if not use the new value in an update query. You will need to 'hide' the key of each record in a hidden input field using it as part of the name of that field such as "name='rowkey[]' " and probably rename the name of the checkbox to be 'rowreset[]' that both use the primary key as the index for each. I hope I'm clear - thinking on the fly here.
-
Do you currently know how to write any code, any language or are you truly a newbie? Your question leaves so many unanswered questions. Like - have you ever written an html form or a php script?
-
Call me picky but how about this annoying situation: You click on a forum topic with your mouse/pointer and up comes the post(s). You start to read it but you left your pointer where it was and Voila - JS has detected that I am inadvertently hovering over the profile/avatar of the topic's poster. Now I have to remove that window with some action. This happens so much that I have to ask - can this "hover" response be changed to look for a click instead? Do we really need to see this information when we didn't really ask for it?
-
While I have not yet used it, and while W3 (I know, I know) specifically excludes IE and Edge as adopters of it, there is a "form" attribute that you can specify in an input element that allows you to specify multiple form ids to which that input element belongs. Sounds like what you need, if it actually works. As for IE and Edge - perhaps W3 is incorrect, so maybe a little research is in order or perhaps a short test form/script...
-
I"m sure micky didn't mean to imply any wrongdoing on your part. He just pointed out that his style/method gives a cleaner, easier-to-read line of code. Yes - yours worked but so does his with less punctuation and quoting.
-
Ditto!!
-
Whatever that sample you linked to IS, I could not possibly have deduced that from the meager coding sample you provided that DID build a form.