-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
You are using php to setup error handling messages in JS. Why? You do realize that you can't have php and JS interact in real time? If you want a real time error message then stick only with the JS code to check the values onsubmit. If you don't want real time, then stick to only php to edit the posted values and send the screen and data back to the user. Can't have it both ways.
-
Also- should you have a need to post more code in the future, please try and format it to make it easier to read and comprehend. Your first post is pretty bad reading.
-
Besides what others are telling you has to be fixed, what are you seeing wrong with your code? You don't check anything so it can't tell you if something is wrong. AND - since you simply make a connection and run a query, what are you missing? Your code as written will not tell you anything. Do you know what a function is?
-
If 1 and 99 and 1000 and 2000 all are the same field and are NUMERIC (not text) that will be difficult.
-
Emails from PHP not arriving on some email addresses
ginerjm replied to Laurie_Hedge's topic in PHP Coding Help
Can you manually send an email to the problem address(es), ie, using Outlook or something similar? -
To give you the details. 1 - get a user id and password from the user 2 - encrypt the password and save the userid and the encrypted password in the users table. When checking a user's login attempt: 1 - get the user's id and password entries 2 - encrypt the password value the exact same way as you did when you stored it 3 - do a query on the table to get the record that matches both the user id and the encrypted password entry 4 - if the query returns exactly 1 record - the user logged in correctly. If not - send them back to login again. As said by Maxxd - you don't return the password in the query, nor do you get it and save it anywhere. The password is not needed once you verify that it was provided correctly. If you need to remember that a user is logged in you create a token that indicates that to your application, such as a $_SESSION var or a cookie but in no way do you store sensitive information in either place.
-
You need to study on how to build a properly structured relational database. Some ideas you should think about are what attributes you want to link to what data. Such as the name of the page from where an item came from should be stored with that item, or linked to it along with other data directly linked to that item.
-
Yes - you have many silly little errors. Turn on php error checking (as in my signature) and fix the little typos and see what happens.
-
How about "DAY(date) as date_dd" and "MONTH(date) as date_mm" and then use date_dd and date_mm as your indices into $row? AND definitely change your code to stop using MySQL_* functions. They are going out of PHP soon.
-
Have you read anything in the php manual that sounds like it might help?
-
Upon further review: YOu are doing two query calls. You are trying to grab data before you do the fetch, which I finally noticed. - do the query call (just once!) - check if it ran - check if there are rows If all this works: - loop thru the rows and grab the items from the $row and echo them
-
You're not doing a fetch call. query check fetch process fetched row repeat fetch
-
Have you checked the manual yet? Read thru the Imap functions.
-
Saving many items(radio button) in one button.
ginerjm replied to ronankeating's topic in PHP Coding Help
Not the way one is supposed to design a database. You have people - persons as you call them. They each have some qualities - attributes in db lingo - which consist of things like: name gender address? title? phone? and other things. These all belong in one table unless you find that you have multiples of them, such as two addresses. (People often have multiple phone numbers but I like keeping them stored in the main table under unique names such as 'home','work','mobile' rather than using a second table. So - in your case - you should not be storing gender in a separate table. Especially since a person can only have one gender and it usually doesn't ever change. -
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
What do you need here? The message pointed you to the line. Look at your code and see what you are missing that the php interpreter is seeing. Undefined variable? You haven't yet used the variable but are trying to get a value from it. A non-wellformed numeric value? Whatever you THINK is a number is NOT. Fix your code. -
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
You're having another issue? With what? A variable? Is there a message with that problem? Give us a hand if you want our help. -
I dont' see these new lines in your previous code posting (which needs to be posted properly next time!). Have you changed things? And as QOC says - names need to match. Quick lesson: The name attributes of input elements are what you need to look for in your $_POST array upon receiving the submit from the client. That's the connection.
-
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
So - I'm guessing that you didn't write this code yourself since you can't even be bothered to look up how to do what I suggested, since you state that you 'echo' statements aren't showing anything. Being new to PHP (or any language) means that you have to do some homework, some reading, some learning, some attempt to comprehend what you are trying to achieve. Not just post some code that you gleaned and can't figure out and ask for someone else to teach you. Make the effort! -
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
I suggested adding some echo statements to show you what the values you are using really are. Add a limit=1 to your query and work through the problem looking at what your code is producing and what it has to work with. That's how one debugs a problem. -
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
I don't see any attempts to debug it as I suggested. -
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
Add some debugging echos to check the values that you are calculating and that could help you figure out the problem. -
To become a programmer you have to have an eye for detail. Look carefully at your lines and you will see your error. As for the div by zero - perhaps you should check the incoming parms to your functions to be sure that they are valid or simply check the values to be used in your calc before using them.
-
Good evening - Money waiting for support on updating a function please
ginerjm replied to sorn53's topic in PHP Coding Help
uhhh - please define 'no longer works'.