
jerryisgood
Members-
Posts
23 -
Joined
-
Last visited
Never
Everything posted by jerryisgood
-
Greetings everyone! I have a form that stores data to a database. Separate from that page I would like to have another where at any given time a user can download a .csv of the most recent addition or two? If not a .csv, can they easily view the record without having to know mySQL / phpAdmin and such? Thanks! Jerry
-
A complex [for me] if / else statement
jerryisgood replied to jerryisgood's topic in PHP Coding Help
The group_concat method is interesting though it still wouldn't give me unique column names which I'd need for my mail merge operation. Thanks though -
A complex [for me] if / else statement
jerryisgood replied to jerryisgood's topic in PHP Coding Help
The logic makes sense I'm just having trouble turning it into working code :-\. I also don't understand why we'd be drawing from the tmpData which doesn't include any of the information from the Referrals or Providers? Do you provide services? I'm trying to wrap this up over night and don't see myself reaching completion. PS - Thank you for the timely and informative response. -
A complex [for me] if / else statement
jerryisgood replied to jerryisgood's topic in PHP Coding Help
Thanks for the recommendation. The tables are exactly the same. There is a tmpData, tmpProviders, and tmpReferrals which, upon submission of review, are moved to finalData, finalProviders, and finalReferrals respectively. While it is true that I can SQL JOIN these three tables to create one, my problem still rests on the possibility that there are more than one entry for the same application in the Provider and Referral tables. This is what I came up with for my SQL JOIN which worked to get all the information I'd need for my Mail Merge: So yes, this puts everything in one row.. However, look what happens from my example illustrated above. Since the Referral table has two rows for tmpID 141, my query has created TWO identical rows now sans the referral information. Ideally I'd want these to all go to the same row with unique column names so that I can use them in my mail merge. Thank you for the quick response by the way, I appreciate it. -
My apologies, I hope this helps: This is one of the two expandable fields in question. So for this particular form, I am entering two referrals, hitting the next button once. So I will have referral 0 and referral 1. In my Referrals table, this is my entry. The ID increments but the tempID remains the same showing that we are dealing with the same form/application. In the table including all of the other post data, minus providers, the ID would match the tempID here. This format does not work for my mail merge operation down the line because that draws from column names. So say I have two fields in my contract fro Provider Name under referrals, I can't use <<Provider Name>> because they both share that column. I would instead want every additional entry to be placed in the same row with a unique column name. Does this make more sense?
-
A complex [for me] if / else statement
jerryisgood replied to jerryisgood's topic in PHP Coding Help
My apologies, I hope this helps: This is one of the two expandable fields in question. So for this particular form, I am entering two referrals, hitting the next button once. So I will have referral 0 and referral 1. In my Referrals table, this is my entry. The ID increments but the tempID remains the same showing that we are dealing with the same form/application. In the table including all of the other post data, minus providers, the ID would match the tempID here. This format does not work for my mail merge operation down the line because that draws from column names. So say I have two fields in my contract fro Provider Name under referrals, I can't use <<Provider Name>> because they both share that column. I would instead want every additional entry to be placed in the same row with a unique column name. Does this make more sense? -
Greetings - So I have an issue with my form right now which can be found here: http://youawfulme.com/Form.html If you look, you will see two expanding columns under Providers and References. The HTML code for them to expand looks like this: and the PHP code that handles their database storage looks like this: At this moment, when you fill out my form, all of the information saves to three separate tables. The Provider input goes into a temporary providers table, the Referrals to a temporary Referral , and the rest of the data to a temporary information table. Once the user submits the application, the temporary tables are cleared after having been moved to permanent tables (Still three tables) My goal is for all of these values to save to one table, whether it be from three separate temps to one final or one temp to one final. My programmer was having trouble figuring it out and kind of left me on my own.. I really need some help The Providers and Reference tables are done in such a way that if there are more than one entry, it will create a new row for each entry with a new ID number but the same "tempid" number, the latter matching the ID number in the main information table. Can I have it such that PHP will check to see if the tempIDs match, and if they do, move the information into new columns on the same row? So that way, instead of having say 3 different IDs with one temp ID for three different providers.. instead have that information all placed on one row, with one ID, and new columns? In my head, I figured I would expand my table 5x. If I have five columns now, I will have 25 after. For each "Provider Name", I will now have "Second Provider Name", "Third Provider" name, etc... If the user only adds one provider, these won't be used. If they had multiples, up to five, the info will be placed into these new columns. I just can't get this to work.. When I expand the column and inspect the element in HTML, it says, for example, Provider[1] and Provider[2] .. Incrementing in brackets for each addition. But if I try to, say .. It simply doesn't work. Sorry for all this, I just need some help and so far you guys have been a great resource. Thank you
-
Perhaps this would be a better question, haha. My programmer kind of left me high and dry and I'm a bit confused. I needed help with two sections on my web form because I couldn't figure out how to store them in my database properly. There are two sections on my web form, which you can see here (http://youawfulme.com/Form.html) that are expandable.. Providers and references.. The code to handle these two sections look like this: I can't honestly say I understand all that what's going on here. What I know is this: My data is being saved into three separate "tmp" tables that autoclear after being moved to three master tables. The first table collects all of the data from that form minus the two sections I had mentioned, which go to the other two respective tables. NOW... This is problematic for me because if the user enters more than one provider or referral, the records may look something like this... So the tmpID matches the ID in the main file so we know they are connected.. but if I go to do a mail merge down the line, I can't do this because they share the same column name My goal is this.. I want ONE master table that will consider the tmpID in the temporary Provider and Refferal Tables.. It can look.. If there is a matching tmpID, it will fill out new columns (with names like, say Second Provider, Third Provider, .. Second Provider Type, Third Provider Type .. etc.) If it's a new tmp ID, meaning a new record all together.. Those fields would just be left blank. Does this help any? Does anyone know if this is possible? I need all the help I can get because I'd like to wrap this up this evening Thanks for the help guys!
-
Greetings! So I've been able to create new tables from existing columns but now I want to push my queries further and I'm not sure how complex I can make a query. Can I do something like this...? Here is an example Say my first table collects all my information about a particular doctor's office.. However, this office can have multiple practices which are stored in my second table.. Now, if Doctor Jame's ID number is 345 in Table 1, his tempID will be 345 in Table 2. So if Doctor James lists two practices in my form, the second table will have auto incrementing IDs but will store the new information in a new row with the same columns and tempID as above... so really, the tempID stays the same for each entry, and only the input data changes and the ID incremented by one. SO... Can I write something that would check the column tempID for duplicates, such as 345 for both entries, and write a NEW column for each field in that record [in the new queried table] .. If not that, can I write each row to a new temporary table that can be merged with whatever else I need from the query? Sorry if I lost you guys.. does this make sense?
-
Joining three tables with different column name?
jerryisgood replied to jerryisgood's topic in MySQL Help
That works! -
Joining three tables with different column name?
jerryisgood replied to jerryisgood's topic in MySQL Help
Or rather, Does that look right? -
Joining three tables with different column name?
jerryisgood replied to jerryisgood's topic in MySQL Help
Thank you for the quick response. I wasn't sure because everywhere I've looked it appeared that the two or three tables would have to have a common column name. So it would associate the two id's together then despite the column names? Would this make sense: Edit: I didn't add any join in mine.. I'm a bit confused by the representations in your example. Would you kindly swap it with my iteration? Does that make sense? Also, will do you forsee me running into trouble where table two or three, since they can be expanded, may have duplicate tmpid values? Ie. Table 1 id-------------name-----------age 001 joe 22 002 rex 65 Table 2 id-------------tmpid---------services offered 001 001 service a 002 001 service b 003 002 service a Table 3 id-------------tmpid------------favorite number(s) 001 001 6 002 002 5 003 002 4 So basically tables 2 and 3 are for the fields that could have multiple responses that can't be in one cell. Is the above code right? and what will that give me? I have the idea in my head I'm just trying to wrap my head around all of this.. This is all stemming from an inability to choose more than one source in mail merge..grr! So Joe provides services a and b and his favorite number is 6 while Rex provides service a as well but his favorite numbers are 5 and 4. How would this look in the merged table? -
Is there a way to join three tables that do not have a common column name? I have three tables.. Table 1: Main data => This table has an "id" that auto increments.. Tables 2 and 3: Other datas => This has an "id" but it does NOT match the id of table one..However, it has a tmpID field that does match. This is because these two tables are related to fields that can be expanded and may have different id numbers but are connected by their tmpID, which is, then, linked to the "id" in table 1. So basically I would like to combine using the commonality that exists in the values of id and tmpid but didn't know if I could do that with two different column names? Thanks in advance
-
Greetings. I received a ton of help over in the PHP boards my I am not running into some problems with mySQL. Issue 1: Any input within a field set is not writing to my table. Inside of my form I have two areas where this occurs: How can I store the data input here into the same table with the rest of the post data from my form?? 2. Any selections made in a drop down menu, whether it be multiple selections or just one, won't appear in my table In my table it simply says "array" Any help would be greatly appreciated
-
New to PHP; Question about storing variables in a db
jerryisgood replied to jerryisgood's topic in PHP Coding Help
I had actually wanted to make my table outside of the script but had some troubles. I am using GoDaddy as a host and it keeps timing out every time I begin writing the table which has 140 inputs. Can I write this in Excel or something else and then somehow upload it to my server to prevent this from happening? -
New to PHP; Question about storing variables in a db
jerryisgood replied to jerryisgood's topic in PHP Coding Help
I'm sorry, I wasn't asking for a list of errors. I was just wondering if there was something that stuck out as incorrect, I don't know. I was just having trouble getting this to work but haven't been receiving any errors. Any errors I did encounter I tried to address. I guess I meant, rudimentary, is there anything that sticks out? Again, my apologies if I asked for too much or anything. I figured I would post my code here while I continued to work on it myself in hopes that maybe someone would look through it in their spare time. Thanks though. J -
New to PHP; Question about storing variables in a db
jerryisgood replied to jerryisgood's topic in PHP Coding Help
Thank you for the quick response.. This is what I have now, before I read your post. Could you kindly tell me what is wrong with this? Should I redo it using your method? I'm not receiving any errors, but there is no activity in my db either. From what I've gathered, I've done a lot of extra unnecessary work in turning those all into variables. Shouldn't it still work in this fashion though? I'm not sure what I'm doing wrong, -
Okay, so I have a form and now I am trying to write the post data to a db. The thing is, the way the HTML was designed, I had to adopt a poor naming convention in order to satisfy some other requirements. I'm just getting into PHP.. Is it possible to assign PHP variables and then store these variables to my database instead? Right now, I have an e-mail sent to myself but it looks like gibberish.. So I started doing this and such for all of my entries.. Could I set up a table using these variables?
-
Trying to combine two different PHP scripts to run at POST
jerryisgood replied to jerryisgood's topic in Third Party Scripts
Is there any way that I can initiate the second php script from the first one using the same post data that the first one uses? Is this a possibility? Would this help me? Can I initiate the Form Tools from my initial PHP script? Will the post data carry over? -
Greetings. I currently have a php script that runs when a form I created is submitted. Basically the script posts the collected data to a second external form and submits it there. Now I want to add Form Tools in order to create a more aesthetically appealing front end and user friendly back end with database support etc. -- I've used FT before, however, never with the involvement of a second PHP script that reroutes the info. At this point, Form Tools is waiting for a test submission from your form. It will use this form submission to know what information should be stored for all future submissions. They give me two options to add my code.. by PHP or API.. PHP is what I usually use, as it's just a matter of adding But now I have a problem because, currently, my submit button So I was told both scripts can't be called in this fashion (two actions from one submit post) but could instead be combined into one .php script - Thanks admin thorpe Being that I'm a new comer to PHP and I didn't write either of these scripts, I don't want to haphazardly combine both scripts and break either one, especially the first. Can someone help me out in discovering the best way to integrate my current PHP file with Form Tool? My current code looks like this: The code I want to add is this... Any help would be TREMENDOUSLY appreciated
-
Greetings everyone, I'm new to both these boards and PHP.. I had php script built for me and have since been building upon it, trying to learn some new stuff along the way I have a form that currently does this... up top, I have this: What this does is run the formload.php which basically fills out a form on a second website with the information entered on my form and submits it there... Now I'm trying to have the SAME submit button also initiate a second php file on my server, one that stores the information into datbase via Form Tools. That code is: Will these play friendly together? Can you tell me if my submit button will successfully submit to the second script if I place that action with the other in the Header?