Jump to content

ok

Members
  • Posts

    130
  • Joined

  • Last visited

    Never

Everything posted by ok

  1. this is basically what is in my mind right now. <?php function member_ranking($referer_name, $total_num_of_invited, $names_of_invited){ } ?> If you have better function or class than this please show me or teach me. thank you.
  2. Hi guys I'm currently working on a "Tell a friend program". I have 2 tables, 1. members 2. invited Ok here is the logic anyone can join the system by referring their friends as many as they can, whoever join the system will be record his name into 'members' table and the friends he invited will be recorded into 'invited' table, of course he can invite as many as he can. Now what i want is to count the total numbers of invited friends that is also sucessfully joined the system (that appear also in members table) and finally assign this total number to the referring member. example; john referred 30 How do you assign this numbers of invited friends into each referrering members. Can you show me class or function for this type of logic. Sorry if my english is not perfect. Thank you in advance.
  3. I have downloaded the PHPMAILER from phpclass.org and used it under GODADDY normaly it function fine, but sometimes it show this message. What is causing this? Any help and advice please? Thank you.
  4. by the way this is the error message.
  5. <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->SMTPAuth = false; #$mail->Username = “sample+yahoo.com”; #$mail->Password = “aspen”; $mail->Host = "relay-hosting.secureserver.net"; // SMTP server $mail->From = "sample@yahoo.com"; $mail->AddAddress("my_email@yahoo.com"); $mail->Subject = "Email from thehightrailsway.com"; $mail->Body = "Simple baby."; #$mail->Body = "School: " . $_POST['School'] . "\n\nContact Person: " . $_POST['ContactPerson'] . "\n\nProgram Dates: " . $_POST['ProgramDates']; $mail->WordWrap = 250; if(!$mail->Send()) { echo "Message was not sent"; echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "<center><b>"; echo "Message was sent, Loading..."; echo "</b></center>"; ?> <META http-equiv="refresh" content="5;URL=http://www.sample_website.com/ProgramFormThanks.html"> <?php } ?>
  6. Hi guys I have a website under godaddy. Server: LINUX Support: PHP 5 I tested sending email in godaddy using php, it worked for a few emails then after 5 times sending the email it stop sending. Anybody can share there experienced under godaddy. Can you guys show me a working codes or tutorial, or link for this matter. Thanks in advance.
  7. Hackers are just a programmer Hackers are immature. (bad programmer) I can be too a hacker, because i have the complete CDs of Mastering cracking (Reverse Software Engineering CDs)... But i remember it's easy to destruct than to construct. So lets give respect to good hackers. (Like us). Cheers...
  8. thanks for your help ProjectFear but ok since you ask the complete logic, then here it is. Ok actually the $name does not contain one value only. The $name is also an array $name[0] = 'robert'; $name[1] = 'john'; $name[2] = 'james'; etc... What i wanted to do is i want to use $name to accept more than one value. Since because $name has more than one user name in it. example If $name[0] which is equal to 'robert' as key name it will accept assigned value in the 2nd index. that is why i needed 2 dimentional array. therefore, $name['robert'][] = 'george'; $name['robert'][] = 'linda; $name['robert'][] = 'emlie'; $name['robert'][] = 'glenda'; etc... but because $name array has more than one name needed to be assign values does i need to do this this way. $array_name=[$name][] = banana; then i can increment like this below, $array_name=[$name++][] = banana; to fill all the names with names. because each name in the $name has more than one sub names. Instead of using the individual name as a key name inside the bracket. But my original codes result into as an error message. Can someone guide me please. Thank you.
  9. Hi I have these very simple codes below, $name = 'robert anderson'; $array_name=[$name][] = banana; I tried this but it's wrong. Can anyone show me the right way. Thanks in advance.
  10. Hi guys i'm pretty sure some of you have or had experience working with godaddy. I have a little problem when sending my email from their server into my email address. They suggest this to me, Please also be sure that you have relay-hosting.secureserver.net applied in the outgoing settings in your coding when you are attempting to send messages through your hosting account. I don't understand this suggestion, can anyone please tell me the meaning of this? Or give me example for this type of prolem. Thank you in advance.
  11. $2 LOL thanks for the reply crayon but uh, actually i'm planning to make it a hobby tho while being a programmer it's also give us money too and that's means profit. I know it's volatile but i'm sure i'm gonna learn from the expert later... Crayon don't you like earning extra money while being a programmer or while you code a web application?
  12. Hi brothers yeah we are all programmers here, I'm just curious if some of you play the stock market and invest with it. Anybody here invest on stock while being a programmer? As a noob on this field what do you suggest for me? Where should i begin studying this matter. It's also great to know if you share your experience and knowledge for this matter. Thank you in advance.
  13. hi guys i have a name below, Brian Stewart between the first name and last name the SPACE i want to replace it with COMMA. can you show me simple script to do this. thank you very much in advance.
  14. Hi guys i want to format the texts message that i want to send into email. Just like when you create a new thread here in this forum, you have an option to format the text and make it bold, change the size of the text, color of the text, center the word and etc... ACtually i'm planning to create my own email tool where you can create your own email message then format it yourself. but is there a ready tool to do this text formatting? Where i can integrate it into my system. Thank you.
  15. lol, it's just an easy logic script. why not create it from scratch.
  16. Yeah i want to master AJAX too... That's one of my dream.
  17. hi guys i found this site. http://www.precisionpyramids.com/ for faster result of your 3rd eye opening. Isn't that cool, we know php and 3rd eye?
  18. but technically i want to master ZEND. and SOFTWARE ENGINEERING. But if god permits me i want to master BioChemical Engineering. Sigh, life is too short, maybe it's the perfect prayer that i should master. :/
  19. corbin it's your choice no one is forcing you. i just want to share.
  20. you practice that everyday, dawn and dusk. religion is good but it is not complete. and we have the option to know the truth.
  21. I just want to share this. me i want to master the 3RD EYE also. http://www.youtube.com/watch?v=7k_0Hwn7yac the third eye is the Ultimate and Higher knowledge of all. Love conquer everything. http://www.youtube.com/watch?v=mAN_ykzXzoM The Pyramid is the best place to open your 3RD EYE. Cheers and good luck.
  22. ok this problem is solved. i figured it out. it's my stupid structure of the program itself that i created.
  23. ok for clarification this are the complete codes, process.php <?php //open connection and assign variables. include 'opendb.php'; $tmp_dir = 'http://' . $_SERVER['HTTP_HOST'] . '/contest.php?'; //catching the values. $ufname = $_POST['ufname']; $ulname = $_POST['ulname']; $uemail = $_POST['uemail']; $ffname = $_POST['ffname']; $flname = $_POST['flname']; $femail = $_POST['femail']; $faces = ''; $space_tmp = ' '; $ufull_name = $ufname . $space_tmp . $ulname; //referer $ffull_name = $ffname . $space_tmp . $flname; //referred ?> <?php //define functions. function insert_invited($ufull_name, $ffull_name) { $query = "SELECT * FROM users WHERE user_name='$ufull_name'"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_array($result); $USERS_userid = $row['user_id']; $USERS_username = $row['user_name']; $query = "INSERT INTO invited (user_id, referer_name, invited) VALUES ('.$USERS_userid.', '$ufull_name', '$ffull_name')"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $query = "SELECT * FROM invited WHERE invited='$ufull_name'"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_array($result); $INV_referer2 = $row['referer_name']; $INV_invited2 = $row['invited']; echo "<br><b>inv_referer2: <b>", $INV_referer2; echo "<br><b>ufull_name: <b>", $ufull_name; echo "<br>"; //update user_join $query = "UPDATE user_join SET invited_by='$INV_referer2' WHERE user_name='$ufull_name'"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); } ?> <?php //verify for duplicate records in USERS table. //if duplicate exist then don't insert, else insert the record. $query = "SELECT * FROM users WHERE user_name='$ufull_name'"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_array($result); $USERS_username = $row['user_name']; $query = "SELECT * FROM invited WHERE invited='$ufull_name'"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_array($result); $INV_referer = $row['referer_name']; $INV_invited = $row['invited']; $query = "SELECT * FROM invited WHERE invited='$ffull_name'"; $result = mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); $row = mysql_fetch_array($result); $INV_referer2 = $row['referer_name']; $INV_invited2 = $row['invited']; if($ufull_name == $USERS_username) { if($ufull_name == $INV_invited && $INV_referer == $ffull_name) { //updaet user_join table. } elseif($INV_invited2 != $ffull_name) { insert_invited($ufull_name, $ffull_name, $INV_referer2); } } elseif($ufull_name == '') { if($ufull_name == $INV_invited && $INV_referer == $ffull_name) { //do nothing. } elseif($INV_invited2 != $ffull_name) { insert_invited($ufull_name, $ffull_name, $INV_referer2); } } else { //insert record into users table if duplicate not found. //insert record into invited table if duplicate not found. $query = "INSERT INTO users (user_name, email, faces, date_join) VALUES ('$ufull_name', '$uemail', '$faces', now())"; mysql_query($query) or die("Problem with the query: $query on line " . __LINE__ . '<br>' . mysql_error()); /* echo "user: ", $USERS_userid; echo "<br><b>ufullname:</b> ", $ufull_name; echo "<br><b>INV_invited:</b> ", $INV_invited; echo "<br><br><b>ffullname:</b> ", $ffull_name; echo "<br><b>INV_referer:</b> ", $INV_referer; */ //if the referer is not yet invited, then add record to INVITED table, else deny. #if($ufull_name == $INV_invited && $INV_referer == $ffull_name) { if($ufull_name == $INV_invited && $INV_referer == $ffull_name) { //do nothing. } elseif($INV_invited2 != $ffull_name) { insert_invited($ufull_name, $ffull_name, $INV_referer2); } } ?>
×
×
  • 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.