-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Posts posted by ginerjm
-
-
That's the problem when one chooses to download someone else's script. You have bugs in them and have to figure them out. As for forum help - we usually try to help those who help themselves by writing their own code. In your case you are taking the easy way out here. First you copy someone's code. Then you want someone else to fix it for you. Not my intent when reading the forums.
I will say this tho - when you get the "header already sent" message it means you are trying to send a header to the client but that something has already been sent and a header must one of the first things to be sent. You have to find where you are sending some output - anything at all - and stop it from being sent first. It could be as simple as a blank line outside of php mode, or a space character that shouldn't be there. Have to go thru all the code to find it. Try exiting your script just prior to the line that is triggering the error message and then go view the source code sent to your client and see what it there.
-
You want to pass a value in thru the calling url. Something like:
http://domain.com/page.php?incfile=myvars1.php
Or
http://domain.com/page.php?incfile=myvars2.php
What's to prevent the user from using the wrong value in their url? Perhaps you should consider putting the value in the login database so that when the user logs in you can get their value from the login process and set it up as a session variable.
-
As you said, write some code.
The forum is for people who actually are trying to write code. It is not here to just figure out what you are talking about it and come up with your solution for you. Try to code it. If you can't then try to learn by reading and researching and becoming a programmer. Or go to the forum designated for professional help and pay someone to write your code for you.
You might also re-read your post and correct the language so that it tells us what you are talking about. I know I'm confused by your post.
-
Use an outer join in your query. Look it up.
PS - this is a good example of what happens when a programmer makes assumptions and doesn't explicitly check the results of things like query executions, file opens, etc. Always, always, always check things.
- 1
-
0 should not be the problem unless you got no results from your query. Test the query result for true and try echoing out the row count value to see what you have.
-
I wouldn't do it. Not knowing how this stuff runs and how to set it up securely and safely and properly is the kind of stuff that people get paid big bucks for. If you hired someone to develop this for you, why are you not hiring someone to run it for you?
Either consider outside help again or start reading.
-
During development you should NOT be hiding any errors. YOu should be programming around them - that's what good coders do. Remove the @ signs and be sure you have php error checking turned on and see what your script might be trying to tell you.
And of course your filenames could be a problem if you are looking for the wrong case in the name.
-
You get WHAT error? "it does" and "it don't" do not tell us much about your problem.
-
When something "didn't work" it usually helps all concerned if the voicer of that meaningless comment provides some backup as to WTH he/she is describing. Someone who was nice enough to provide a goodly chunk of code to you deserves more of a response than this so that he/she can help possibly debug it or to further discuss with you the problem.
Jeez!
-
Try turning on error checking so that any sql errors will be displayed for you.
-
Since you are building your query string with double quotes you don't need to double quote out of the string for each variable.
values('$var','$var2','$var3'.....)
-
"I decided to create an install.tmp file..." - Sounds backwards
-
Or FPDF
-
Your sms doesn't handle html most likely.
-
The complexity of this code you have written (?) is such that I think you s/b able to solve it. You are using an index that doesn't yet exist. Figure it out.
-
I think a link should show up for you only since it is your post.
-
So this question should be marked 'answered'?
-
IN your second query you call the 'query' function. In your first query you never made a call to the query function, hence no update.
-
My previous question re: testing your query result was not answered. Do you in fact have code that tests the result of your query function call? Show us that code and also the complete query statement that you are trying to execute. Use an echo if you have to in case you are building it with php values in it. Something like this code:
$q = 'select (stuff) from (table) where (condition)'; $qresult = $pdo->query($q); // test if query ran if (!$qresult) { echo "Error - could not execute query #1. Query is<br> $q"; exit(); } // process valid query results here.
Note: the parens in the query statement are only there for example.
-
Are you checking the query result to see if it failed? If not, why do you think that is the problem?
-
Do some things that experienced programmers do everyday. Add error checking when you do things that could go wrong. Things like opening up a file, or running a query. How do you know it actually happened if you don't check? When you read the manual ( you did read the manual?) didn't you wonder why many of these functions return a Boolean value? It's there so you can check the success or failure of that function.
Make your life easier by using the list() function to capture the csv fields. This will give you real field names instead of an array with numeric indices. Makes it easier to follow what you are doing especially when doing debugging.
BTW - why are you inserting only one field when you have all that data?
-
HTH!
BTW - the example was supposed to be indented for ease of understanding and readability. The forum didn't seem to respect my spacing. I like to keep the braces at the same indent level as the verb they belong to, with the statements inside the braces indented one stop. And so on.
-
if (condition) { if (condition) { statements... } else { statements... } } else { statements... }
-
What about passing the value as a hidden field from the first script to the form on the second one?
MySQL and variables help
in PHP Coding Help
Posted
$_SERVER not $_SESSION