-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
proper way would be to edit your web server's default settings for custom error messages for 404 page not found to point to your own page, normaly with a logging script on it and a more human friendly message.
-
Ok, what's your full table layout for the login and family? What's the Actual problem here? You know that you shouldn't query the database to see if a family id already exists and then error if it does? make familyId a Unique Index and the database will produce an error for you if you try to enter a duplicate. Why are you running md5() twice? Don't use select *
-
hmmm....there's quite a lot wrong with that code, but to address your actual question we'll need to see the content of your secu() function
-
hold up, where is this data coming from?
-
you can create a timestamp field that has a default value of current_timestamp() and not set the on update aspect of it, maybe that's what you were thinking?
-
Mutli Form Submits In Select Dropdown
Muddy_Funster replied to ricky spires's topic in PHP Coding Help
you are setting to $getPropCats to an empty string in it's not in the url, so in these events, when you pass that to the query you are for CATS::find_by_parent you will end up with the query SELECT * FROM prop_cats WHERE type_id= ORDER BY name In the assumed or die() part of the find_by_sql() output the query string as it was sent to the DB and you should see what's going on better. -
Loading Two Files At Once With Fopen()
Muddy_Funster replied to ScrewLooseSalad's topic in PHP Coding Help
fopen() returns a resource, not the content of the file. you want either file() or, more suted to what you are doing, file_get_contents() for that one. -
Mutli Form Submits In Select Dropdown
Muddy_Funster replied to ricky spires's topic in PHP Coding Help
You don't think that, since the error is with the SQL, it may be helpfull if we could see those classes? -
And neither it is, a glaring example of what happens when one assumes rather than researches. I has taken the assumption that mysql would have reserved the use of password as it is an internal function call. So yeah, hand's up I'm a mug.
-
Mutli Form Submits In Select Dropdown
Muddy_Funster replied to ricky spires's topic in PHP Coding Help
wheres the actual SQL? -
My best suggestion to answer your questions would be "Suck it and see". Play with it, bend it, bash it, break it. Find out first hand what works and what doesn't.
-
It's not childish or silly to point out when somone is being blatantly obtuse with the resources given. You have taken time and effort from many people on this site only to time and again thrown it to the wayside on each occasion. What you are being told to do is not in the slightest complicated, if you are finding it to be such then you really need to get some proper educational material on the subject and work through it fully. To address your password issue: You shouldn't touch a password hash with mysql_real_escape_string() at any point - there is absoloutly no need. Your actual problem is, once again, your table. You have a field name that is actualy a mysql reserved word - password. Put backticks around it in the query and you should get on a lot better. You would have found the same problem in using a plain text password as you are finding here with the hash. Not that this is even remotely related to your initial question.
-
Display List Of Folders And Link To Individual Pages
Muddy_Funster replied to mallen's topic in PHP Coding Help
sounds like you want to be using glob() -
probably more using the field type timestamp set to on_update = current_timestamp()
-
Loading Two Files At Once With Fopen()
Muddy_Funster replied to ScrewLooseSalad's topic in PHP Coding Help
you don't need a second file, just do it with variables within the script. -
well the smarter part wouldn't be much of a challenge would it
-
hmm too nixy a term for a linux guy is it? My definition of a webDemon would be the service application used to serve http responses over an IP network: such as apache, IIS or any of the ones listed here. Hope that clears up my shorhand term
-
Sending Form Mail With Smtp And Using Gmail For Email
Muddy_Funster replied to happypete's topic in PHP Coding Help
Me either, but I lack the power to move it muhahahaha -
Sweet Jezus, this is so far from complicated it can't even see it on the horizon. It's not wizardry, fundimentaly it's common sense taken a step further to be practicaly applicable to RDBS's. Do you genuinely suffer from encapsulated multiple personality dissorder? You don't recall the numerous previous discussions about normalising your data for other tables?
-
Sending Form Mail With Smtp And Using Gmail For Email
Muddy_Funster replied to happypete's topic in PHP Coding Help
you shouldn't need to do anything with the MX records. when using the SMTP protocall you will need to validate the account against the gmail servers and route the mail through them, thus the sending MX record will reflect the google servers. You can, however, save much headache by simply adding the domain email address to your gmail account using the gmail Mail Fetcher as explained here and have access to all the mails from both accounts via your gmail account. Edt: clarified wording -
Sessions And Cookies To Log Into A Website
Muddy_Funster replied to kevinkhan's topic in PHP Coding Help
You DO NOT EVER store user credentials in a cookie, or in a session. the php manual page on setcookie() is quite clear with some decent examples. What's causing you the problems? -
Best way would be to have 2 pages, one for the display and one for the download, either link to the download on the display page or use a JS script to auto load the second page with the download content in it.
-
@samvuk - give us a bit more info about your development setup. What webDemon/php/os are you using? create a new page in your webroot and call it myPHPinfo.php and put the following code in it : <?php phpinfo(); ?> @Christian F. - You shouldn't really use parenthesis for include or require as they arn't really functions. And just to clarify for the OP's benefit. By default your file extension must be .php, if you edit your webDemon config for what application to launch what extension with you can add to it to make it be whatever you want. using .htm or .html isn't even close to wize though, as the native bevhaviour of the webDemon will interfeer with your settings. also, while the extension of the file you are navigating to in your browser is important, the extension of the included or required file is not at all. You can call it anything you like as long as it's there PHP will try to parse it. Edt: tag Errors
-
you can't have more than one option as selected="selected", no matter what is chosen the select bumps to Wimbeldon Park after the submit button is hit. The best way to do this is using AJAX set on the onchange of the Select Box. I see you already have some JS on the page, so just add another function to deal with the AJAX request to populate the form values. Jquery makes this a lot easier, so you probably want to look into getting that on your server, or linking to the google mini hosted version. That said, looking at your query I'm not totaly convinced your tables are designed properly, and I don't think your query is correct, you go par1->par8 and then pa9 at the end....type-o on the site or in the query? Another thing, you get the results out of the database, and don't seem to do anything with them, you have refference to $_POST['par1'] and such, but there are no form fields with that name. Another thing, looking at the source of the form, you have 9 groups of input where two fields have the same name for each group, every element should have a unique name, and if you are using id's they should all be unique as well. The only thing that should be attached to more than one element on a document is a class. So: you need to look at properly naming the form element values, you need to look at the query and make sure there arn't any type-o's in it, you need to think about, and change, what you are trying to do with the $_POST['parX'] list, you need to create some way of getting the information from the database onto the screen, you need to fix your selected="selected" on the dropdown, you should probably look into using a JQuery AJAX call instead of the submit button to populate the values of the form that you are getting from the database. That's just at a glance, but let us know how it goes. Edt: for typing errors
-
Also, why do you run 2 queries on the same table? and why do you run one of them twice? and the use of $result then $result1 is bad naming practice.