
defeated
Members-
Posts
246 -
Joined
-
Last visited
Everything posted by defeated
-
Genius!!!! thanks a million.
-
is $_SESSION complicated? I am at the limit of my abilities with what I'm doing. I don't mind expanding my abilities but it has to be within reach of someone with little grasp of what they are doing. To put it in context.... I've been working on this site since September! Granted I knew ABSOLUTELY nothing when I started but progress is slow. Don't want to get bogged down following an approach to this that I will get stuck in since I am already stuck with formmail with attachments and being stuck in two places at once would be nearly enough to make me give up! Nearly.
-
The login form action is POST. this is processed by a file called security.php which checks input against a table in mySQL which authenticates users and passwords. It then autodirects to the next page .. CMS.php passing on a variable that can be used in another mySql table to get content specific to a particular user. I don't think I can use post between Security.php and CMS.php because there is no form between the two. Am I being thick?
-
I have a login script which is working beautifully. It is for an in-house CMS so it loads a list of users from a mySql db and adds them to a select input in a form and then they just have to put in their password. That then creates an id which is passed using the GET method...... not a good idea. Now all anybody has to do to bypass the login is type in ..../CMS.php?ID=username in the url. Doh!!! Any suggestions of a better way of passing the login info? Each user sees only info applicable to them on subsequent pages based on their login and info in the db pertaining just to them. Hope that makes sense. Ian.
-
Anybody? Plllleeeeeaaaaassssseeeee!!!!!! I've just had a bad experience trying to implement a different mailer with SMTP. Got nowhere AGAIN and screwed up something. Now the inbox in outlook says there is a new message when there isn't. I really really need the phpmailer to work! I know I'm probably one of these people that should leave what I don't know about alone but I made a promise that I'd get the site up and running after the original (bought) product looked crap and did nothing. I can't let them down. Please someone help.
-
Looked at that GameYin, No mention of attachments. Thanks though. The thought is appreciated. . . . .not as much as a solution..... but appreciated never the less!
-
Anybody got any further ideas?
-
Hi, I'm new to all this... but have you tried ... instead of require_once("../mainfile.php"); putting in the whole address eg. "http://www.whatever.com/mainfile.php" Just had a look at what I have... it's like this.. include ('/home/j56789/public_html/header.php'); where j56789 is the user name provided by the host. And public_html is where my index lives. I saw something about using a php.ini file but could not find one on my server. with that you can point to all your includes and requires and then just have to input require_once("mainfile.php"); and it will find it no matter what folder level you are on. Hope that helps a little. Probably not though.
-
I tried looking at the above. I tried a couple of things but couldn't get anything to work. I'm afraid it's all a little beyond me. I don't really follow whats happening there..... maybe I will down the line but that's then and this is now. I'm so lost. 6 months ago I didn't know any HTML let alone anything else. I've bitten off more than I can chew I think. Still, now that I've bitten I WILL get there. Besides this stuff is great when it works. Even decided I'm going to college this year to learn software dev properly. Meanwhile.......... ???
-
Nope..... getting colder. that returned "Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/j43012:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/j43012/public_html/postjob/mailer.php on line 35 Failed to move uploaded file" I'm still really appreciating all the help though
-
Ok... so I did that. It failed to materialise in my webmail but when I sent it to another account it came up as a dat file with a different name (php435363632) or something like that..... I can smell success. The original file was a mycv.doc, but it was created on an outdated mac not Word and saved as a word file so there may be issues there. So priority now is to get the original file name to send followed by recieving as a .doc, rtf and txt would be nice too since it will only be cv's that should be sent. Thank you so so much for the input so far... getting there.
-
I'm guessing that $attachment=(is_array($_FILES['attachment']))? implode($_FILES['attachment']):$_FILES['attachment']; is where the problem.... or at least one of the problems is. I put the line in because $attachment was returning as "array" when I echoed it. Ian
-
That sounds about right Haku. I could set it to run daily and that would do the trick.. any pointers on where to look for how to go about setting one up? Thanks Ian.
-
<?php //access mailer require ('/home/j43012/public_html/cgi-bin/class.phpmailer.php'); $mail = new PHPMailer(); $subject=$_POST['subject']; $attachment=(is_array($_FILES['attachment']))? implode($_FILES['attachment']):$_FILES['attachment']; $mail->From = "[email protected]"; $mail->FromName = "The Website"; $mail->AddAddress("[email protected]", "JBM.ie"); $mail->AddAddress("[email protected]"); // name is optional $mail->AddReplyTo("[email protected]", "Information"); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->AddAttachment("$attachment"); // add attachments $mail->AddAttachment("$attachment"); // optional name $mail->IsHTML(true); // set email format to HTML $mail->Subject = "$subject"; $mail->Body = "This is the HTML message body <b>in bold!</b>"; $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Message has been sent"; ?>
-
like the subject asks. I want mysql to mail me when data has expired or is just about to expire so that I can update it if needs be and somebody told me to use cronjobs. Ta much
-
Yup. It tells me the message is sent and then when it arrives there is no attachment. :-\
-
Hi, I've got a problem. I have a job website and need people to be able to apply for a job and send their cv. I CANT get anything to attach and send from a form. I will then be using mySQL data to insert selected job details into the email. I have lost count of how many scripts I have tried using. I don't know if i'm just not getting something. I am using <input type="file" name="attachment"> in the form and can't seem to get a script to get me from there to an e-mail in my inbox with a cv attached. The closest I got was a script that sent a jpeg from another site. It was the only thing that worked for me and was useless. I have little hair left and am pulling what remains out like a madman. I have worked on this for weeks trying every search I can think of. Did I mention that this stuff is WAY beyond me at the moment? HEEEELLLLLLPPPPP!! Cheers in advance Ian. P.S. Tried the sourceforge phpmailer. Couldn't get it to work like all the others but if somebody can babystep me through the attachment part from the form as described above I'd be happy to use it. pps. ok I'm rambling now so I'll just push post..... hard to see the button through the tears!
-
I ran your script and it is the closest I have come to having a working attachment mailer. The file came through but was empty when it opened up in MSWord. I am trying to make a form where candidates can mail their cv's to us but this stuff is way over my head. PLEASE somebody help out on this one.
-
Sending array to mysql without square brackets after name
defeated replied to defeated's topic in PHP Coding Help
That's great thanks a million. Got it to work eventually by adding id='descript' to the select of the form and changing the java to descript instead of the select name. Then I was able to keep the square brackets after the select name. Happy days. -
Sending array to mysql without square brackets after name
defeated replied to defeated's topic in PHP Coding Help
That's great!!! It took me a while.... a long while but I finally got it to work by adding id='ident' on the form and putting ident in instead of the select name in the javascript. That way I got to keep the square brackets on the select name and both the java and php are happy with me. I am delighted! Now on to the next problem..... but that's a subject for a new post! Thanks again. BTW... the reason I went with Java over php for the select is that it's a long form and it would have been really messy submitting and resubmitting.... probably beyond me at this stage.... I'm very new to all this. I realise that java has limitations but since this will be an 'in house' form I can ensure that all the computers have java enabled in the browser. Plus.... it worked -
Sending array to mysql without square brackets after name
defeated posted a topic in PHP Coding Help
Hi, Here is my problem (one of them anyway). I have a form that sends job details to a mysql db. Some of the inputs in this form allow multiple selections for which I add "[]" to the end of the name of the input (eg name="location[]") which tells php to expect an array. I then use implode to insert the data into the db as a list separated by commas. This works perfectly. The problem is that for one of the places where I would use this I cant. I have field called 'jobtype' that displays a selection list of job types eg, accounting, medical, financial etc. I then use java to populate a field called 'roles' depending on the first selection. So if accounting is selected in the 'jobtype' field then the 'roles' field is automatically filled with relevant roles like "accounting technician, bookkeeper, tax-accountant, auditor etc". The trouble is that I need to be able to select several 'roles' and if I use name="roles[]" then the javascript won't work. So what I need is a get out of jail free card ( a way around this problem). I am really new to PHP and haven't an inkling of how to do it. I am happy with the Javascript and don't want to use PHP for that function since it makes no sense to use a server side script for that function. I just want to know is there a way I can for example give the field an id other than the name attribute for either the java or php to work from? Heeeellllllppppp!!!!!