Jump to content

nouse4one

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nouse4one's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I did not even notice, the profile links colors have been changed to white.
  2. I have recently made alot of changes and optimized alot of my code. I need some one NOT using firefox to check for functionality of my site. It is a dating application site ( you can make a girlfriend or boyfriend application) i have allready set up a test account for you or... you can make your own (i would prefer you made your own to test my site to its fullest) login:beta pw:Ro11m3. Let me know whatcha think! Thank you in advance for you help. http://www.screencupid.com
  3. Thank you for your review i have since ditched the red banner and completely re did my sites graphics and layout. I also optimized the alot of the php which i got sloppy with. Again i value your input thank you
  4. ?????? <?php require_once('appvars.php'); require_once('connectvars.php'); $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $query = "SELECT sub_count FROM my_user WHERE user_id = '" . $_POST['user_id'];. "'"; $sub_count = ('user_id', $row['user_id'], $row['sub_count'] + (1)); mysqli_close($dbc); ?> how do i use the update function?
  5. Yes that is exactly what i need help with. Can you help explain record number adding from form submissions? or perhaps point me in the right direction?
  6. This is a girlfriend/boyfriend dating application website i got the idea from a tucker max book i read thought it was hilarious. Please check it out and post your thoughts this is my first server side/Mysql creation and need feed back 9 days strait im not sure if i can see the forest through the trees any more. http://www.screencupid.com or see a test profile http://www.screencupid.com/60 or to make your own http://www.screencupid.com/signup.php
  7. Thank god 12 days straight working on this thing! Now i need a hit counter to count every time some one submits a email to one of my users. Each user on my site has a profile with there personal info stored in my db, which is called by a user_id. On each of there profile's they have a survey. After some one fills out there survey and clicks submit i want it to add a +1 to there db info so they can keep track of how many peeps fill out there dating application. check out a live example here screencupid.com/60 do i use fwrite functions with a text file? Can i store the numbers in my db?
  8. Yes im only writing stuff into the body of the email message <?php $to = $_POST['email_addy']; $subject = "RE: your dating app"; $body = $_POST['vieweremail']; $body .= $_POST['viewername']; $body .= " "; $body .= $_POST['areacode']; $body .= " "; $body .= $_POST['phone2']; $body .= " "; $body .= $_POST['phone3']; $body .= " "; $body .= $_POST['viewercomments']; $body .= " "; $body .= $_POST['q1']; $body .= " "; $body .= $_POST['q2']; $body .= " "; $body .= $_POST['q3']; $body .= " "; $body .= $_POST['q4']; $body .= " "; $body .= $_POST['q5']; $body .= " "; $body .= $_POST['q6']; $body .= " "; $body .= $_POST['q7']; $body .= " "; $body .= $_POST['q8']; $body .= " "; $body .= $_POST['q9']; $body .= " "; $body .= $_POST['q10']; $body .= " "; $body .= $_POST['q11']; $body .= " "; $body .= $_POST['q12']; $body .= " "; $body .= $_POST['q13']; $body .= " "; $body .= $_POST['q14']; $body .= " "; $body .= $_POST['q15']; $body .= " "; $body .= $_POST['q16']; $body .= " "; $body .= $_POST['q17']; $body .= " "; $body .= $_POST['q18']; $body .= " "; $body .= $_POST['q19']; $body .= " "; $body .= $_POST['q20']; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> this works buts is there a better way?
  9. Thank you i got it to work, a bit buggy however it is very usable.
  10. <?php $to = $_POST['email_addy']; $subject = "RE: your dating app"; $body = $_POST['vieweremail']; $body .= $_POST['viewername']; echo $body; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> That is a big no go. I have over 30 fields i want to be included in my email body, can you give me a example im not getting it.
  11. I am experiencing compleate brain failure here please help if you can. This is my email script, how do i include multiple input, into the $body tag? example: vieweremail + comments + phonenumber + alot other stuff?? As of now i can only make it include 1 user input field thats is 'vieweremail'. <?php $to = $_POST['email_addy']; $subject = "RE: your dating app"; $body = $_POST['vieweremail']; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?>
  12. That last line of code on my emailscript was transferred to this thread my mistake please disregard it. what happens now when i click send? Absolutely nothing i can't figure out a way to collect all the data on the page. And then insert it into the email to my member.
  13. I am stumped here, can not figure out a efficient way to collect all the data on this page and send it to my to user's id number. I am trying to format the email to include question #1 and then next to it radio1 (answer yes/no) , question#2 and so on followed by the viewers input from the last part of the form. Does any one know of some thing im missing here? <?php session_start(); // If the session vars aren't set, try to set them with a cookie if (!isset($_SESSION['user_id'])) { if (isset($_COOKIE['user_id']) && isset($_COOKIE['username'])) { $_SESSION['user_id'] = $_COOKIE['user_id']; $_SESSION['username'] = $_COOKIE['username']; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Social Filter - View Profile</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <h3>View Profile</h3> <font size="2"> <?php require_once('appvars.php'); require_once('connectvars.php'); // Make sure the user is logged in before going any further. if (!isset($_SESSION['user_id'])) { echo '<a href="signup.php">Create your own account</a>.</p>'; } else { echo('<p class="login">You are logged in as ' . $_SESSION['username'] . '. <a href="logout.php">Log out</a>.</p>'); } // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Grab the profile data from the database if (!isset($_GET['user_id'])) { $query = "SELECT username, first_name, last_name, gender, birthdate, city, state, picture, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, q11, q12, q13, q14, q15, q16, q17, q18, q19, q20 FROM mismatch_user WHERE user_id = '" . $_SESSION['user_id'] . "'"; } else { $query = "SELECT username, first_name, last_name, gender, birthdate, city, state, picture, q1, q2, q3, q4, q5, q6, q7, q8, q9, q10, q11, q12, q13, q14, q15, q16, q17, q18, q19, q20 FROM mismatch_user WHERE user_id = '" . $_GET['user_id'] . "'"; } $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { // The user row was found so display the user data $row = mysqli_fetch_array($data); echo '<table cellpadding="0" cellspacing="0" border="0"><TR><TD> '; if (!empty($row['picture'])) { echo '<table cellpadding="0" cellspacing="0" border="1"><TR><td class="label">Picture:</td><td><img src="' . MM_UPLOADPATH . $row['picture'] . '" width="120" height="140" alt="Profile Picture" /></td></tr></table></td><td>'; } if (!empty($row['username'])) { echo '<table cellpadding="1" cellspacing="0" border="0"><TR><td class="label">Username:</td><td>' . $row['username'] . '</td></tr>'; } if (!empty($row['first_name'])) { echo '<tr><td class="label">First name:</td><td>' . $row['first_name'] . '</td></TR>'; } if (!empty($row['last_name'])) { echo '<tr><td class="label">Last name:</td><td>' . $row['last_name'] . '</td></TR>'; } if (!empty($row['gender'])) { echo '<tr><td class="label">Gender:</td><td>'; if ($row['gender'] == 'M') { echo 'Male'; } else if ($row['gender'] == 'F') { echo 'Female'; } else { echo '?'; } echo '</td></tr>'; } if (!empty($row['birthdate'])) { if (!isset($_GET['user_id']) || ($_SESSION['user_id'] == $_GET['user_id'])) { // Show the user their own birthdate echo '<tr><td class="label">Birthdate:</td><td>' . $row['birthdate'] . '</td></tr>'; } else { // Show only the birth year for everyone else list($year, $month, $day) = explode('-', $row['birthdate']); echo '<tr><td class="label">Year born:</td><td>' . $year . '</td></tr>'; } } if (!empty($row['city']) || !empty($row['state'])) { echo '<tr><td class="label">Location:</td><td>' . $row['city'] . ', ' . $row['state'] . '</td></tr>'; } echo '</td></tr></table></td></Tr></table><hr></font><FONT color="#666666" size="1" face="Courier"><table cellpadding="20" cellspacing="0" border="0"><tr><td>'; if (!isset($_GET['user_id']) || ($_SESSION['user_id'] == $_GET['user_id'])) { echo '<p>Would you like to <a href="editprofile.php">edit your profile</a>?</p>'; } } // End of check for a single row of user results else { echo '<p class="error">There was a problem accessing your profile.</p>'; } if (!empty($row['q1'])) { echo '1. ' . $row['q1'] . '<BR><input type="radio" name="radio1" id="yes1" value="yes" /> <label for="yes1">YES</label> or <input type="radio" name="radio1" id="no1" value="no" /> <label for="no1">NO</label><BR>'; } else { echo ' User has not made a application yet...<BR>'; } if (!empty($row['q2'])) { echo '2. ' . $row['q2'] . '<BR><input type="radio" name="radio2" id="yes2" value="yes" /> <label for="yes2">YES</label> or <input type="radio" name="radio2" id="no2" value="no" /> <label for="no2">NO</label><BR>'; } else { echo ' <BR>'; } if (!empty($row['q3'])) { echo '3. ' . $row['q3'] . '<BR><input type="radio" name="radio3" id="yes3" value="yes" /> <label for="yes3">YES</label> or <input type="radio" name="radio3" id="no3" value="no" /> <label for="no3">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q4'])) { echo '4. ' . $row['q4'] . '<BR><input type="radio" name="radio4" id="yes4" value="yes" /> <label for="yes4">YES</label> or <input type="radio" name="radio4" id="no4" value="no" /> <label for="no4">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q5'])) { echo '5. ' . $row['q5'] . '<BR><input type="radio" name="radio5" id="yes5" value="yes" /> <label for="yes5">YES</label> or <input type="radio" name="radio5" id="no5" value="no" /> <label for="no5">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q6'])) { echo '6. ' . $row['q6'] . '<BR><input type="radio" name="radio6" id="yes6" value="yes" /> <label for="yes6">YES</label> or <input type="radio" name="radio6" id="no6" value="no" /> <label for="no6">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q7'])) { echo '7. ' . $row['q7'] . '<BR><input type="radio" name="radio7" id="yes7" value="yes" /> <label for="yes7">YES</label> or <input type="radio" name="radio7" id="no7" value="no" /> <label for="no7">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q8'])) { echo '8. ' . $row['q8'] . '<BR><input type="radio" name="radio8" id="yes8" value="yes" /> <label for="yes8">YES</label> or <input type="radio" name="radio8" id="no8" value="no" /> <label for="no8">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q9'])) { echo '9. ' . $row['q9'] . '<BR><input type="radio" name="radio9" id="yes9" value="yes" /> <label for="yes9">YES</label> or <input type="radio" name="radio9" id="no9" value="no" /> <label for="no9">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q10'])) { echo '10. ' . $row['q10'] . '<BR><input type="radio" name="radio10" id="yes10" value="yes" /> <label for="yes10">YES</label> or <input type="radio" name="radio10" id="no10" value="no" /> <label for="no10">NO</label><BR></td><TD>'; } else { echo '<BR></td><td>'; } if (!empty($row['q11'])) { echo '11. ' . $row['q11'] . '<BR><input type="radio" name="radio11" id="yes11" value="yes" /> <label for="yes11">YES</label> or <input type="radio" name="radio11" id="no11" value="no" /> <label for="no11">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q12'])) { echo '12. ' . $row['q12'] . '<BR><input type="radio" name="radio12" id="yes12" value="yes" /> <label for="yes12">YES</label> or <input type="radio" name="radio12" id="no12" value="no" /> <label for="no12">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q13'])) { echo '13. ' . $row['q13'] . '<BR><input type="radio" name="radio13" id="yes13" value="yes" /> <label for="yes13">YES</label> or <input type="radio" name="radio13" id="no13" value="no" /> <label for="no13">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q14'])) { echo '14. ' . $row['q14'] . '<BR><input type="radio" name="radio14" id="yes14" value="yes" /> <label for="yes14">YES</label> or <input type="radio" name="radio14" id="no14" value="no" /> <label for="no14">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q15'])) { echo '15. ' . $row['q15'] . '<BR><input type="radio" name="radio15" id="yes15" value="yes" /> <label for="yes15">YES</label> or <input type="radio" name="radio15" id="no15" value="no" /> <label for="no15">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q16'])) { echo '16. ' . $row['q16'] . '<BR><input type="radio" name="radio16" id="yes16" value="yes" /> <label for="yes16">YES</label> or <input type="radio" name="radio17" id="no16" value="no" /> <label for="no16">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q17'])) { echo '17. ' . $row['q17'] . '<BR><input type="radio" name="radio17" id="yes17" value="yes" /> <label for="yes17">YES</label> or <input type="radio" name="radio17" id="no17" value="no" /> <label for="no17">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q18'])) { echo '18. ' . $row['q18'] . '<BR><input type="radio" name="radio18" id="yes18" value="yes" /> <label for="yes18">YES</label> or <input type="radio" name="radio18" id="no18" value="no" /> <label for="no18">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q19'])) { echo '19. ' . $row['q19'] . '<BR><input type="radio" name="radio19" id="yes19" value="yes" /> <label for="yes19">YES</label> or <input type="radio" name="radio19" id="no19" value="no" /> <label for="no19">NO</label><BR>'; } else { echo '<BR>'; } if (!empty($row['q20'])) { echo '20. ' . $row['q20'] . '<BR><input type="radio" name="radio20" id="yes20" value="yes" /> <label for="yes20">YES</label> or <input type="radio" name="radio20" id="no20" value="no" /> <label for="no20">NO</label><BR></td><td></font></font>'; } else { echo '<BR></td><td valign="top"></font></font><FONT color="#000000" size="1">'; } mysqli_close($dbc); ?> <script> function autotab(original,destination){ if (original.getAttribute&&original.value.length==original.getAttribute("maxlength")) destination.focus() } </script> <fieldset> <legend>Your Contact Information</legend> </font></font><FONT color="#cccc99" size="2" face="Impact"> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="100%" border="0" cellpadding="2"> <tr> <td><div align="right"> <label for="vieweremail">Email</label> </div></td> <td><div align="left"> <input name="vieweremail" type="text" id="vieweremail" size="35" maxlength="90" /> </div></td> </tr> <tr> <td><div align="right"> <label for="veiwername">Name</label> </div></td> <td><div align="left"> <input name="veiwername" type="text" id="veiwername" size="35" maxlength="100" /> </div></td> </tr> <tr> <td><div align="right"> <label for="viewerphone">Phone Number</label> </div></td> <td><div align="left"> <input name="Phone1" type="text" id="phone1" onkeyup="autotab(this, document.form1.phone2)" size="3" maxlength="3" /> <input name="phone2" type="text" id="phone2" onKeyup="autotab(this, document.form1.phone3)" size="3" maxlength="3" /> <input name="phone3" type="text" id="phone3" onKeyup="autotab(this, document.form1.viewercomments)" size="4" maxlength="4" /> </div></td> </tr> <tr> <td><div align="right"> <label for="viewercomments">Comments</label> </div></td> <td><div align="left"> <textarea name="viewercomments" cols="26" rows="4" id="viewercomments"></textarea> </div></td> </tr> <tr> <td><div align="right"> <label for="viewerpic">Your Picture (optional)</label> </div></td> <td><div align="left"> <input name="viewerpic" type="file" id="viewerpic" size="22" /> </div></td> </tr> <tr> <td><div align="right"> <label for="clear"></label> <input type="reset" name="clear" id="clear" value="Clear Form!" /> </div></td> <td><div align="left"> <label for="submit"></label> <input type="submit" name="submit" id="submit" value="Send Email" /> </div></td> </tr> </table> </form> </fieldset> <BR><BR><BR><BR><BR><BR> </td></tr></table> </body> </html> Here is the send mail script im using.... trying to anyways. <?php require_once('appvars.php'); require_once('connectvars.php'); // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); if (isset($_POST['submit'])) { $from = 'cupid@cupidsomething.com'; $subject = $_POST['subject']; $text = $_POST['q1, q2,q3,q4....ect...etc....cet.....eece.c.']; $output_form = false; if (empty($subject) && empty($text)) { echo 'You forgot the email subject and body text.<br />'; $output_form = true; } if (empty($subject) && (!empty($text))) { echo 'You forgot the email subject.<br />'; $output_form = true; } if ((!empty($subject)) && empty($text)) { echo 'You forgot the email body text.<br />'; $output_form = true; } } else { $output_form = true; } if ((!empty($subject)) && (!empty($text))) { $query = "SELECT user_id FROM email_list WHERE user_id = '$user_id'; $result = mysqli_query($dbc, $query) or die('Error querying database.'); while ($row = mysqli_fetch_array($result)){ $to = $row['email']; $first_name = $row['first_name']; $last_name = $row['last_name']; $msg = "Dear $first_name $last_name,\n$text"; mail($to, $subject, $msg, 'From:' . $from); echo 'Email sent to: ' . $first_name . '<br />'; } mysqli_close($dbc); } if ($output_form) { ?> Any help would be greeeeatly appreciated. Here is a live example of this at www.interestingspecies.com/mismatch/20
  14. Yes this was the answer i was seeking! Thank you! It turned out to be much simpler then expected only a few lines of coding solved my problem (2 lines to be exact). The problem: want each user to have a specific url for there profile. Example: instead of http://www.mydomain.com/mismatc/viewprofile.php?user_id=12 This is what can be used: http://www.mydomain.com/mismatch/12 Here is how i did it. Opening up note pad and puting the following code (see attached gif) then saving it as .htaccess, and uploading in into my main host directory. Here are a couple of sites that have some great material on this,wettone.com/code/clean-urls or www.desiquintans.com/cleanurls [attachment deleted by admin]
  15. Yes i am interested in the other method you suggest. I only want the user created directory to house 1 page thats is it. On this page it will have all the information they entered, reflected from my database. please tell me more about this .htaccess you speak of, would it make this task simpler? and could you show me a code example?
×
×
  • 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.