Jump to content

ron8000

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

About ron8000

  • Birthday 11/30/1981

Contact Methods

  • AIM
    Ron803

Profile Information

  • Gender
    Male
  • Location
    Baltimore, MD

ron8000's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You would be correct. $mail->WordWarp = 50; Don't know if that would throw a 500 error tho... but check it out!
  2. I'm not sure what to tell you, but everything looks good.
  3. Hello everyone, I'm creating an AJAX Select Box filter for a project, I am using Prototype (latest ver) My goal is when a user makes a selection the JS will send a request to a script and send 1. A formated list of all the select fields 2. The name of the field that was changed. 3. The value of the field that was changed. I've got the php script done, and at the moment to output either. 1. name=value&name=value 2. JSON formated object My issue lies in pulling the vaues by a JS Var. function filterRequestReturn(requestResponse) { var info = requestResponse.responseText; /* For JSON */ var ajax_return = evalJSON(true) /* For the name=value&name=value var ajax_return = info.split('&'); */ var filter_fields = jsFilter.split("-"); filter_fields = filter_fields.without(''); for(var i=0;i<filter_fields.length;i++) { alert(ajax_return.filter_fields[i]); } var oXY2=$('myTestDiv'); oXY2.style.zIndex = '140'; oXY2.innerHTML=ajax_return.total; oXY2.show(); } The line alert(ajax_return.filter_fields); will not work... is there a way to pull values form a JSON object using a var?
  4. If you are getting an error 500 then you need to check your log files to see what happened. If you have cPanel they will be in there as Error Logs and see what caused the error.
  5. you need to make sure that the language dir is there as well, and if you can post your error message that you are getting that would help tons.... if you are not getting one then at the very top of the script insert the code below. <?php error_reporting(E_ALL); ?>
  6. I have done the whole 9 yeards on this site, but i need to know if it's anywhere up to par. Please let me know what you think, functionality, look, flow, all comments are welcome! http://www.hotstuff-fashion.com Thank you!
  7. Yes, when you download the phpMailer and extract it if you put the script i posted into that same dir it should work. You may need to change some things as far as vars go but that's it. Let me know if you need more then that.
  8. I posted this for another question but you may find it useful as well.
  9. This is a function from my DB class that is what you are looking for. <?php public function dbGetFields($table) { $this->error = FALSE; $query = "SHOW COLUMNS FROM ".$this->dbFormat($table); $result = $this->dbQuery($query); if(!$result) { return FALSE; } for($i=0;$i<mysql_num_rows($result);$i++) { $row = mysql_fetch_assoc($result); $fields[$i] = $row['Field']; } return $fields; } ?> Enjoy Let me know if it works!
  10. Welcome to PHP! Its great stuff! Now there are lots of recources out there to help you on your way. To this day PHP.net is my best rescource for functions and general language questions. Now on this that your are doing now. I will suggest this. 1. Start with a login form, where the user will input the username and password. 2. Post it to the same page, and then run the query -> "SELECT FirstName,data FROM Members WHERE username='" . $_POST['username'] . "' AND password ='" . $_POST['password'] . '" LIMIT 1" Then once you have a result you can load all of the data into the session vars that you need. <?php $result = mysql_query("SELECT FirstName,data FROM Members WHERE username='" . $_POST['username'] . "' AND password ='" . $_POST['password'] . '" LIMIT 1"); if(!$result) { echo mysql_error(); } else { $row = mysql_fetch_array($result); $_SESSION['FirstName'] = $row['FirstName']; } ?> Now just to note this script is missing alot of stuff but you will be able to get the basic understanding I think... Let me know if you have any questions. and again Welcome to PHP!
  11. I am going to have to suggest a PHP Mailer class that I have been using for some time now. It's VERY fast and has yet to let me down. http://phpmailer.codeworxtech.com/ This is a VERY extensive class and has lost of room to add if you are in to that but the basic idea will get you started and emailing in PHP fast and easy. Here is a basic example of how to send an HTML email. <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->ClearAddresses(); $mail->AddAddress($_POST['email']); $mail->FromName = "My Name"; $mail->FromAddress = "me@mail.com"; $mail->IsHTML(true); $mail->WordWarp $mail->Subject = "Thank you!"; $body = "<div><h4>My Title!</h4></div>"; $body .= "Thank you Info what not here blah blah<br><br>"; $body .= "<p>Your Var = ".$myVar."</p>"; $this->Body = $body; if($mail->Send() !== false) { echo "YAY WE DID IT!"; } else { echo "Jump!"; } ?> I hope this helps you!
  12. ron8000

    sql query

    I depends on how the password was crypted to begin with. For example if you used the PASSWORD('mypass') function in mySQL then you would use the same thing to match it. If you used a scripting crypt like md5 or sha1 then you would crypt the pass and query for the crypted pass and match them. Hope this helps "SELECT * FROM users WHERE password=PASSWORD('mypass') LIMIT 1" or <?php $password = mysql_real_escape_string(md5('mypass'))); "SELECT * FROM users WHERE password='".$password."' LIMIT 1" ?>
  13. I'm not sure you are following. 1. When you define a auto-increment field it will ALWAYS give a unique id. 2. When you are trying to make things relitave to another there HAS to be a common ground between the two. a simple solution to your problem is to give the table a new field called session_id. use that to store the session_id() when the file is uploaded. this will give you a way to get the files form the same user. this will also on the other hand, if a user is uploading more then one quote at durring any given session the id will be the same and not work for you. there is still hope with this method tho, if you destory the session and generate a new session_id when the form is completed, you will not have that problem. ^^ let me know if we are making progress! Learning is hard but the rewards are GREAT!
  14. my suggestion is to use the session id as your unique id... this is not the best method imo but it's the easiest another suggestion is to crate a table with 1 col for each file and file info that you want to store So both files form one person will go in one row and you can just set a max number of files and make that the max number of fields in the db... Other then thos 2 suggestions you need to create a user system that will give them an id and you can use that id form the user table and ref it like that So joe signs up for w/e and he's given a login or just a code w/e he uses that to upload the times and you can ref him in the user DB as the sender of the files... If this is not clear just let me know and i'll see if i can't clear it up for you
  15. Just wanted to know if you are still having probs, sorry about this morning needed to get at least an hr of sleep still got a lot of work to do very busy building a GUI framework but just post and let me know if you still need help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.