-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
I meant 'why NOT do the dump before the query'.
-
Along with mac_gyver's great post let me re-enforce something he alluded to: NEVER STORE A PASSWORD IN ANY WAY, SHAPE OR FORM. You use a password to interrogate your authentication table and once used you discard it. Create a token or simply use the username (key) to keep track of the user's status. One doesn't need the password. If you need anything else from the login process store some token or the actual 'something' but NEVER SAVE THE PASSWORD! Storing a password value only leaves you open to some malicious activity where you inadvertently leave yourself vulnerable or where some other vulnerability in the system allows a hacker to see what you have saved.
-
Sounds like your query failed to produce the resulting object you expect. Why do the dump before you run the query?
-
So now you can see how the reference to the multiple files fields should be done, thanks to cyberRobot's post. It still doesn't change the fact that once you get these images you shouldn't be storing them in a table, but rather in a folder for direct reference when needed. Design your own storage scheme and stick to it.
-
Style a wordpress admin dashboard for page of a plugin
ginerjm replied to Nonno's topic in PHP Coding Help
Uh.... 1 - maybe you want to post in a CMS forum or a specific Wordpress forum 2 - What is the exact problem? Your whole idea? OR the single CSS selector for that heading? 3 - If it actually is that single CSS selector you should have posted it - in the css forum. -
Are you getting any error from your query? Do you have php error checking turned on? I've not done it so I have to ask - are you sure that you can upload multiple images using the array format for the name attribute in your html? If you can you need to add another index to that name, [0],[1],[2] I think. And finally - storing of images in a db is not the recommended way. An image is a large object that can stand on its own as long as you know the name (which you do) and the location (which you do). One simply grabs it for display purposes using the info in the db that points to it. No need for the overhead of storing and retrieving it from the db.
-
Login page that writes email address to a database
ginerjm replied to stuart180's topic in PHP Coding Help
I would simply add the address input field to the login screen and add the db update to the same script that is processing the login. -
The only php logic/code you are showing us is the part that checks for the existence of the 'txtName' field in your html input. Sure you are using a php echo command to store all the html code but I don't see a script that uses that variable (to output it to the client) nor do I see any code that even attempts to receive the input from your form and try to validate it. How about making a stab at receiving the POST data and doing some reading and attempt to write proper handling code? Then ask for help making it correct.
-
No. You got a better result. This time you show a string that apparently contains 17 printable chars, as the var_dump told you. As Barand pointed out, your previous test showed only 10 printable (visible) chars, yet var_dump said there were 17 actual chars in the content. So - why are you getting non-printable chars in your input?
-
Have you written any php code? That's what we are here to help with, and since you haven't shown us any php code there's nothing for us to help you with.
-
I would think that if someone logs in while selecting the remember box checkbox, that is when you save the cookie. You always save any specific login info that your appl will need later on that session, but you won't always save a cookie (probably holding the userid only). If the user logs in without checking the remember me box, then you simply don't save a cookie. I imagine the cookie would have some application-specific name to it.
-
A professional emailer? Sounds like a spammer to me. Or is that an 'amateur' emailer?
-
Can I combine a open source commenting script with mybb forum script
ginerjm replied to Sperks's topic in PHP Coding Help
A good programmer would look at the two and decide how to do it, or if it was possible. How can we make this call since we can't see any of the code? -
If you couldn't use the manual to figure out this problem, how the heck are you writing all your other php code? $str = ''; foreach($array as $item) $str .= $item .', '; $str = trim($str,','); echo $str; OR the simpler approach: $str = implode(',',$array); echo $str; I think you should spend some time reading the manual and getting familiar with the language you have chosen to use.
-
code tags are the word 'code' inside [] to start and [/] to close with your code in between.
-
Try putting the start PHP mode tag before the calls instead of after them.
-
No. That's where you define it. Where do you USE it?
-
Where do you use $query_params?
-
1 - you are missing a closing form tag here. 2 - you want to post each single ticket with a separate booking number. That means a customer with 3 tickets has 3 booking numbers? Really? How will you tie the tickets to the purchaser?
-
What do you have to show us so far?
-
Help With Created Administration Panel for PHP-Fusion Panel
ginerjm replied to DarkDesirez's topic in PHP Coding Help
Really? I'm going to click on your link and open a potentially harmful zip file? Plus - since you zipped it up it probably is a large file of a large script which you then expect people to read thru and understand. How about isolating the part of the code that is giving you the problem and then asking for help with that and then posting the code right here in the forum, using the proper code tags? -
As my signature suggests, turn on php error checking and see what your script then shows you. Leave programming? What? You thought this stuff was easy?
-
$_SERVER not $_SESSION
-
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.