Jump to content

OriginalBoy

Members
  • Posts

    93
  • Joined

  • Last visited

    Never

Everything posted by OriginalBoy

  1. Hey Please review my new website www.developersmatch.com. Our goal is to get clients to sign up and developers to sign up and we connect the to. Clients is our big target because it is not so hard to get developers to sign up. Please critique my new site and any promotion tips is much appreciated. Best Regards Stephen
  2. Ugh where do i put it all...do u have an example code?
  3. I don't get this can you explain a bit more?
  4. I need it to use sessions though so it can remember the data if something goes wrong. Does anyone have a tutorial to look at?
  5. I changed it to that code and had no luck still. :-\
  6. no i don't mean like that it goes to the right page just shows the homepage content
  7. I added that but it still does the same thing and goes back to the homepage if u fill it out with some errors and submit you will see.
  8. this always used to work without this and with this it does not work comes up showing no page. I don't think the issue is caused there
  9. Here is the whole of p_developer.php <?php include("../config.inc.php"); session_start(); session_destroy(); include("../functions.inc.php"); session_start(); $fname = clean_data($_POST['fname']); $lname = clean_data($_POST['lname']); $email = clean_data($_POST['email']); $email2 = clean_data($_POST['confirmemail']); $sq = clean_data($_POST['security']); $sa = clean_data($_POST['securityanswer']); $bname = clean_data($_POST['bname']); $budget = clean_data($_POST['budget']); $deadline = clean_data($_POST['deadline']); $otherinfo = clean_data($_POST['other']); $_SESSION['fname'] = $fname; $_SESSION['lname'] = $lname; $_SESSION['email'] = $email; $_SESSION['secq'] = $sq; $_SESSION['seca'] = $sa; $_SESSION['bname'] = $bname; $_SESSION['budget'] = $budget; $_SESSION['deadline'] = $deadline; $_SESSION['other'] = $otherinfo; $skill_count = 0; if (!strstr($email, "@") || !strstr($email, ".") || $email == "" || $email != $email2){ $_SESSION['error_email'] = true; $_SESSION['error'] = true; } if (!(isset($fname)) || $fname == ""){ $_SESSION['error_firstname'] = true; $_SESSION['error'] = true; } if (!(isset($lname)) || $lname == ""){ $_SESSION['error_lastname'] = true; $_SESSION['error'] = true; } if (!(isset($sq)) || $sq == ""){ $_SESSION['error_secretq'] = true; $_SESSION['error'] = true; } if (!(isset($sa)) || $sa == ""){ $_SESSION['error_secreta'] = true; $_SESSION['error'] = true; } if (isset($_SESSION['error']) && $_SESSION['error'] == true){ header("location:./?page=register&error=true"); } else{ $sql = "INSERT INTO `clients` (first_name, last_name, email, security_question, security_answer, business_name, budget, deadline, other_details) VALUES('$fname', '$lname', '$email', '$sq', '$sa', '$bname', '$budget', '$deadline', '$otherinfo');"; mysql_query($sql); $to = $_POST['email']; $from = "'Developers Match'<contact@developersmatch.com>"; $subject = "Welcome"; $message = "Thank you for signing up you will be contacted shortly with any developers we find. For any support please read our FAQ online and you can email us on\n\r \n\r Email - contact@developersmatch.com\n\r \n\r Best Regards, \n\r DevelopersMatch.com"; $headers = "From: $from\r\n"; mail($to, $subject, $message, $headers) or die("ERROR!"); $to = 'contact@developersmatch.com'; $from = "'Developers Match'<contact@developersmatch.com>"; $subject = "New Client"; $message = "$fname $lname has signed up as a client to our service. Please make him feel comftable in our service with friendly and personal contact. All details can be found on the database. His/Her email is $email"; $headers = "From: $from\r\n"; mail($to, $subject, $message, $headers) or die("ERROR!"); header("location:./?page=register&register=success"); } ?>
  10. http://www.developersmatch.com/developersmatch/client/index%20copy.php you can see what happens there... here is the code... <?php if ($_GET['error'] == true && $_SESSION['error'] == true){ $fname = $_SESSION['fname']; $lname = $_SESSION['lname']; $email = $_SESSION['email']; $secq = $_SESSION['secq']; $seca = $_SESSION['seca']; $bname = $_SESSION['bname']; $budget = $_SESSION['budget']; $deadline = $_SESSION['deadline']; $other = $_SESSION['other']; if (isset($_SESSION['error_firstname'])){ $fname_color = "#CC0000"; } else{ $fname_color = "#ffffff"; } if (isset($_SESSION['error_lastname'])){ $lname_color = "#CC0000"; } else{ $lname_color = "#ffffff"; } if (isset($_SESSION['error_email'])){ $email_color = "#CC0000"; } else{ $email_color = "#ffffff"; } if (isset($_SESSION['error_secretq'])){ $sq_color = "#CC0000"; } else{ $sq_color = "#ffffff"; } if (isset($_SESSION['error_secreta'])){ $sa_color = "#CC0000"; } else{ $sa_color = "#ffffff"; } if (isset($_SESSION['error_work'])){ $work_color = "#CC0000"; } else{ $work_color = "#ffffff"; } if (isset($_SESSION['other'])){ $other_color = "#CC0000"; } else{ $other_color = "#ffffff"; } if (isset($_SESSION['error_username']) || isset($_SESSION['error_password']) || isset($_SESSION['error_tos']) || isset($_SESSION['error_email'])){ print "<p>Errors found. Please review the form.</p> <p>Errors are in red</p>"; } echo<<<END <form name="client" method="post" action="p_developer.php"> <table width="400" border="0" align="center"> <tr> <td>* First Name:</td> <td><input type="text" name="fname" id="fname" size="8" value="$fname" style="background:$fname_color"/></td> </tr> <tr> <td>* Last Name:</td> <td><input type="text" name="lname" id="lname" size="8" value="$lname" style="background:$lname_color"/></td> </tr> <tr> <td>* Email:</td> <td><input type="text" name="email" id="email" size="8" value="$email" style="background:$email_color"/></td> </tr> <tr> <td>* Confirm Email:</td> <td><input type="text" name="confirmemail" id="confirmemail" size="8" value="$email" style="background:$email_color"/></td> </tr> <tr> <td>* Security Question:</td> <td><input type="text" name="security" id="security" size="8" value="$secq" style="background:$sq_color"/></td> </tr> <tr> <td>* Security Answer:</td> <td><input type="text" name="securityanswer" id="answer" size="8" value="$seca" style="background:$sa_color"/></td> </tr> <tr> <td>Business Name:</td> <td><input type="text" name="bname" size="8"/></td> </tr> <tr> <td>Budget:</td> <td><input type="text" name="budget" id="budget" size="8" value="$budget" /></td> </tr> <tr> <td>Deadline:</td> <td><input type="text" name="deadline" rows="5" id="deadline" size="8" value="$deadline" /></td> </tr> <tr> <td>* All other details:</td> <td><textarea name="other" rows="5" id="other" value="$other" size="8" style="background:$other_color"></textarea></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit" /></td> <td> </td> </tr> </table> END; } elseif(isset($_GET['register']) && $_GET['register'] == success){ print "<p>Account created Successfully!</p>\n<p>Please check your inbox to verify your email address<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />"; } else{ ?> <form name="client" method="post" action="p_developer.php"> <table width="400" border="0" align="center"> <tr> <td>* First Name:</td> <td><input type="text" name="fname" id="fname" size="8" /></td> </tr> <tr> <td>* Last Name:</td> <td><input type="text" name="lname" id="lname" size="8" /></td> </tr> <tr> <td>* Email:</td> <td><input type="text" name="email" id="email" size="8" /></td> </tr> <tr> <td>* Confirm Email:</td> <td><input type="text" name="confirmemail" id="confirmemail" size="8"/></td> </tr> <tr> <td>* Security Question:</td> <td><input type="text" name="security" id="security" size="8" /></td> </tr> <tr> <td>* Security Answer:</td> <td><input type="text" name="securityanswer" id="answer" size="8"/></td> </tr> <tr> <td>Business Name:</td> <td><input type="text" name="bname" size="8"/></td> </tr> <tr> <td>Budget:</td> <td><input type="text" name="budget" id="budget" size="8" /></td> </tr> <tr> <td>Deadline:</td> <td><input type="text" name="deadline" rows="5" id="deadline" size="8" /></td> </tr> <tr> <td>All other details:</td> <td><textarea name="other" rows="5" id="other" size="8"></textarea></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit" /></td> <td> </td> </tr> </table> </form>
  11. Here is how it is defined... if (!strstr($email, "@") || !strstr($email, ".") || $email == "" || $email != $email2){ $_SESSION['error_email'] = true; $_SESSION['error'] = true; } if (!(isset($fname)) || $fname == ""){ $_SESSION['error_firstname'] = true; $_SESSION['error'] = true; } if (!(isset($lname)) || $lname == ""){ $_SESSION['error_lastname'] = true; $_SESSION['error'] = true; } if (!(isset($sq)) || $sq == ""){ $_SESSION['error_secretq'] = true; $_SESSION['error'] = true; } if (!(isset($sa)) || $sa == ""){ $_SESSION['error_secreta'] = true; $_SESSION['error'] = true; } if (isset($_SESSION['error']) && $_SESSION['error'] == true){ header("location:./?page=register&error=true"); }
  12. I have a form which submits and if there is an error it sends to this page... if (isset($_SESSION['error']) && $_SESSION['error'] == true){ header("location:./?page=register&error=true"); } When it sends it just takes it to the homepage. if ($_GET['error'] == true && $_SESSION['error'] == true){ $fname = $_SESSION['fname']; $lname = $_SESSION['lname']; $email = $_SESSION['email']; $secq = $_SESSION['secq']; $seca = $_SESSION['seca']; $bname = $_SESSION['bname']; $budget = $_SESSION['budget']; $deadline = $_SESSION['deadline']; $other = $_SESSION['other']; if (isset($_SESSION['error_firstname'])){ $fname_color = "#CC0000"; } else{ $fname_color = "#ffffff"; } if (isset($_SESSION['error_lastname'])){ $lname_color = "#CC0000"; } else{ $lname_color = "#ffffff"; } if (isset($_SESSION['error_email'])){ $email_color = "#CC0000"; } else{ $email_color = "#ffffff"; } if (isset($_SESSION['error_secretq'])){ $sq_color = "#CC0000"; } else{ $sq_color = "#ffffff"; } if (isset($_SESSION['error_secreta'])){ $sa_color = "#CC0000"; } else{ $sa_color = "#ffffff"; } if (isset($_SESSION['error_work'])){ $work_color = "#CC0000"; } else{ $work_color = "#ffffff"; } if (isset($_SESSION['other'])){ $other_color = "#CC0000"; } else{ $other_color = "#ffffff"; } if (isset($_SESSION['error_username']) || isset($_SESSION['error_password']) || isset($_SESSION['error_tos']) || isset($_SESSION['error_email'])){ print "<p>Errors found. Please review the form.</p> <p>Errors are in red</p>"; } echo<<<END <form name="client" method="post" action="p_developer.php"> <table width="400" border="0" align="center"> <tr> <td>* First Name:</td> <td><input type="text" name="fname" id="fname" size="8" value="$fname" style="background:$fname_color"/></td> </tr> <tr> <td>* Last Name:</td> <td><input type="text" name="lname" id="lname" size="8" value="$lname" style="background:$lname_color"/></td> </tr> <tr> <td>* Email:</td> <td><input type="text" name="email" id="email" size="8" value="$email" style="background:$email_color"/></td> </tr> <tr> <td>* Confirm Email:</td> <td><input type="text" name="confirmemail" id="confirmemail" size="8" value="$email" style="background:$email_color"/></td> </tr> <tr> <td>* Security Question:</td> <td><input type="text" name="security" id="security" size="8" value="$secq" style="background:$sq_color"/></td> </tr> <tr> <td>* Security Answer:</td> <td><input type="text" name="securityanswer" id="answer" size="8" value="$seca" style="background:$sa_color"/></td> </tr> <tr> <td>Business Name:</td> <td><input type="text" name="bname" size="8"/></td> </tr> <tr> <td>Budget:</td> <td><input type="text" name="budget" id="budget" size="8" value="$budget" /></td> </tr> <tr> <td>Deadline:</td> <td><input type="text" name="deadline" rows="5" id="deadline" size="8" value="$deadline" /></td> </tr> <tr> <td>* All other details:</td> <td><textarea name="other" rows="5" id="other" value="$other" size="8" style="background:$other_color"></textarea></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit" /></td> <td> </td> </tr> </table> END; } Any suggestions? Thanks, Steve
  13. <?php function encrypt($data){ $enc_data = md5($data."X5ouZtsKES7h"); return $enc_data; } function clean_data($data){ $data = mysql_real_escape_string($data); $data = strip_tags($data); return $data; } function userLevel(){ return $_SESSION['user_level']; } function box2(){ if (login(true, false, false)){ print "<a href='?page=logout'>Logout</a>"; if(isAdmin()){ print "<a href='?page=see_all_users'>View All Developers</a>";; } } else{ /* Login box */ print "<a href='?page=login'>Login</a>"; echo<<<END END; } } function login($check_login=false, $username=false, $password=false){ if ($username != false && $password != false && $check_login != true){ $sql = "SELECT * FROM `developers` WHERE `email`='$username' AND `password`='$password' AND `valid`=1;"; $result = mysql_query($sql); $total_found = mysql_num_rows($result); if ($total_found < 1){ return false; } else{ $row = mysql_fetch_assoc($result); $_SESSION['username'] = $row['email']; $_SESSION['user_level'] = $row['user_level']; $_SESSION['user_id'] = $row['id']; $_SESSION['is_valid'] = true; return true; } } elseif ($check_login == true && $_SESSION['is_valid'] == true && isset($_SESSION['username'])){ return true; } else{ return false; } } function logout(){ session_unset(); session_destroy(); header("location:?"); exit(); } function getTopSites($limit){ $sql = "SELECT * FROM `developers` ORDER BY `id` DESC LIMIT $limit"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $site_image = $row['image']; $site_url = $row['website']; $site_title = $row['company_name']; $id = $row['id']; $owner_id = $row['owner_id']; $count_comments = countComments($id); print "<p><a href='./?page=site_info&id=$id'><p>$site_title </a> $count_comments Comments(<a href='./?page=comment&id=$id'>Add</a>)</p></p>"; } } function viewSelectedSite($id, $new_tab=true){ $sql = "SELECT * FROM `developers` WHERE `id`='$id' LIMIT 1;"; } function countComments($id){ $sql = "SELECT * FROM `comments` WHERE `site_id`='$id' ORDER BY `id` DESC;"; $result = mysql_query($sql); $number = mysql_num_rows($result); return $number; } function getSelectedSiteComments($id){ $sql = "SELECT * FROM `comments` WHERE `site_id`='$id' ORDER BY `id` DESC;"; $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)){ $name = $row['name']; $datetime = $row['datetime']; $subject = $row['subject']; $message = $row['comment']; $message = str_replace("\\", "", $message); $subject = str_replace("\\", "", $subject); if ($url != ""){ $name_url = "<a href='$url' target='_blank'>$name</a>"; } else{ $name_url = $name; } $comment = $row['comment']; echo<<<END <table border="0" width="100%"> <tr> <td><h3>$name_url</h3></td> <td align="right">$datetime</td> </tr> </table> <table border="0"> <tr> <td><h3>$subject</h3></td> </tr> </table> <table border="0"> <tr> <td>$message</td> </tr> </table> <br /><br /> <hr width='50%' size='7' align='left' noshade> END; } print "<br /><br /><br /><br /><hr width='100%' size='7' align='left' noshade>"; } function addComment($id, $name, $url, $comment){ /* We don't allow URLs in their comments */ if (strstr($comment, "a href") || strstr($comment, "img src")){ return false; } else{ $comment = strip_tags($comment); $sql = "INSERT INTO `comments` VALUES('','$id','$name','$email','$comment');"; mysql_query($sql); return true; } } function getAdvertisement($type, $limit="none"){ if (is_numeric($limit)){ $sql = "SELECT * FROM `advertisement` WHERE `type`='$type' ORDER BY RAND() LIMIT $limit;"; } else{ $sql = "SELECT * FROM `advertisement` WHERE `type`='$type' ORDER BY RAND() LIMIT 1;"; } $result = mysql_query($sql); $number = mysql_num_rows($result) or 0; if ($number != 0){ $row = mysql_fetch_assoc($result) or "empty"; $url = $row['url']; $img = $row['img_url']; $ad = "<p><a href=\"$url\" target=\"_BLANK\"><img class='addy' src=\"$img\" border=\"0\"></a></p><br />"; } else{ $ad = ""; } return $ad; } function isAdmin(){ if ($_SESSION['user_level'] == "3"){ return true; } else{ return false; } }
  14. <?php include("config.inc.php"); session_start(); include("functions.inc.php"); $_SESSION['username'] = $_POST['username']; $_SESSION['email'] = $_POST['email']; $fname = clean_data($_POST['fname']); $lname = clean_data($_POST['lname']); $email = clean_data($_POST['email']); $email2 = clean_data($_POST['confirmemail']); $sq = clean_data($_POST['security']); $sa = clean_data($_POST['security_answer']); $work = clean_data($_POST['pwork']); $website = clean_data($_POST['website']); $skills1 = clean_data($_POST['skills1']); $skills2 = clean_data($_POST['skills2']); $skills3 = clean_data($_POST['skills3']); $skills4 = clean_data($_POST['skills4']); $skills5 = clean_data($_POST['skills5']); /* data that is not checked */ $bname = clean_data($_POST['bname']); $country = clean_data($_POST['country']); $other = clean_data($_POST['otherskills']); /* END data that is not checked */ $_SESSION['fname'] = $fname; $_SESSION['lname'] = $lname; $_SESSION['email'] = $email; $_SESSION['secq'] = $sq; $_SESSION['seca'] = $sa; $_SESSION['skill'] = $skill; $_SESSION['website'] = $website; $_SESSION['other'] = $other; $skill_count = 0; if (isset($skills1) && $skills1 != ""){ $skill_count++; } if (isset($skills2) && $skills2 != ""){ $skill_count++; } if (isset($skills3) && $skills3 != ""){ $skill_count++; } if (isset($skills4) && $skills4 != ""){ $skill_count++; } if (isset($skills5) && $skills5 != ""){ $skill_count++; } if ($skill_count < 1){ $_SESSION['error_skill'] = true; $_SESSION['error'] = true; } if (!strstr($email, "@") || !strstr($email, ".") || $email == "" || $email != $email2){ $_SESSION['error_email'] = true; $_SESSION['error'] = true; } if (!(isset($fname)) || $fname == ""){ $_SESSION['error_firstname'] = true; $_SESSION['error'] = true; } if (!(isset($lname)) || $lname == ""){ $_SESSION['error_lastname'] = true; $_SESSION['error'] = true; } if (!(isset($sq)) || $sq == ""){ $_SESSION['error_secretq'] = true; $_SESSION['error'] = true; } if (!(isset($sa)) || $sa == ""){ $_SESSION['error_secreta'] = true; $_SESSION['error'] = true; } if (!(isset($skill)) || $skill == ""){ $_SESSION['error_skill'] = true; $_SESSION['error'] = true; } if (!(isset($work)) || $work == ""){ $_SESSION['error_work'] = true; $_SESSION['error'] = true; } if (isset($_SESSION['error']) && $_SESSION['error'] == true){ header("location:./?page=register&error=true"); } else{ $password = encrypt($password1); $sql = "INSERT INTO `developers` VALUES('','$fname', '$lname', '$email', '$passowrd1', '$secruity_question', '$security_answer', '$country', '$typeofskills', '$previous_work', '$image', '$website', '$company_name', '0','0');"; mysql_query($sql); $to = $_POST['email']; $from = "'Developers Match'<contact@developersmatch.com>"; $subject = "Validate your E-Mail Address"; $sql = "SELECT * FROM `developers` WHERE `email`='$email';"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); $id = $row['id']; $key = md5(date("M-d-Y H:i:s").date("r")."fsdwe89@s".$id.$username.$email); $sql = "INSERT INTO `verify` VALUES('$id', '$key');"; mysql_query($sql); $message = "Thank you for regestring with Developers Match.\n\r Please copy the link below, and paste it in your browser window:\r\n {$main_site_url}validate.php?id=$id&key=$key\r\n If you are unable to use this method to validate your account, you can go to\r\n {$main_site_url}?page=validator\r\n and enter the following key to activate your account:\r\n $key\r\n Thank you for registering,\r\n\r\n\r\n DevelopersMatch.com"; $headers = "From: $from\r\n"; mail($to, $subject, $message, $headers) or die("ERROR!"); header("location:./?page=register&register=success"); } ?>
  15. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php:2) in /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php:2) in /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php on line 87 I get that error :'(
  16. He does he just did it in a rush or maybe I put it together wrong.... Can someone help me fix this?
  17. I got it made for me by a friend I don't know anything about sessions
  18. I receive this error when I submit a form Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php:2) in /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php on line 4 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php:2) in /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php on line 7 Warning: Cannot modify header information - headers already sent by (output started at /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php:2) in /home1/jonsjava/public_html/developersmatch/developersmatch/p_developer.php on line 89 Here is the code <?php include("config.inc.php"); session_start(); session_destroy(); include("functions.inc.php"); session_start(); $_SESSION['username'] = $_POST['username']; $_SESSION['email'] = $_POST['email']; $fname = clean_data($_POST['fname']); $lname = clean_data($_POST['lname']); $email = clean_data($_POST['email']); $email2 = clean_data($_POST['confirmemail']); $sq = clean_data($_POST['security']); $sa = clean_data($_POST['security_answer']); $work = clean_data($_POST['pwork']); $website = clean_data($_POST['website']); $skills1 = clean_data($_POST['skills1']); $skills2 = clean_data($_POST['skills2']); $skills3 = clean_data($_POST['skills3']); $skills4 = clean_data($_POST['skills4']); $skills5 = clean_data($_POST['skills5']); /* data that is not checked */ $bname = clean_data($_POST['bname']); $country = clean_data($_POST['country']); $other = clean_data($_POST['otherskills']); /* END data that is not checked */ $_SESSION['fname'] = $fname; $_SESSION['lname'] = $lname; $_SESSION['email'] = $email; $_SESSION['secq'] = $sq; $_SESSION['seca'] = $sa; $_SESSION['skill'] = $skill; $_SESSION['website'] = $website; $_SESSION['other'] = $other; $skill_count = 0; if (isset($skills1) && $skills1 != ""){ $skill_count++; } if (isset($skills2) && $skills2 != ""){ $skill_count++; } if (isset($skills3) && $skills3 != ""){ $skill_count++; } if (isset($skills4) && $skills4 != ""){ $skill_count++; } if (isset($skills5) && $skills5 != ""){ $skill_count++; } if ($skill_count < 1){ $_SESSION['error_skill'] = true; $_SESSION['error'] = true; } if (!strstr($email, "@") || !strstr($email, ".") || $email == "" || $email != $email2){ $_SESSION['error_email'] = true; $_SESSION['error'] = true; } if (!(isset($fname)) || $fname == ""){ $_SESSION['error_firstname'] = true; $_SESSION['error'] = true; } if (!(isset($lname)) || $lname == ""){ $_SESSION['error_lastname'] = true; $_SESSION['error'] = true; } if (!(isset($sq)) || $sq == ""){ $_SESSION['error_secretq'] = true; $_SESSION['error'] = true; } if (!(isset($sa)) || $sa == ""){ $_SESSION['error_secreta'] = true; $_SESSION['error'] = true; } if (!(isset($skill)) || $skill == ""){ $_SESSION['error_skill'] = true; $_SESSION['error'] = true; } if (!(isset($work)) || $work == ""){ $_SESSION['error_work'] = true; $_SESSION['error'] = true; } if (isset($_SESSION['error']) && $_SESSION['error'] == true){ header("location:./?page=register&error=true"); } else{ $password = encrypt($password1); $sql = "INSERT INTO `developers` VALUES('','$fname', '$lname', '$email', '$passowrd1', '$secruity_question', '$security_answer', '$country', '$typeofskills', '$previous_work', '$image', '$website', '$company_name', '0','0');"; mysql_query($sql); $to = $_POST['email']; $from = "'Developers Match'<contact@developersmatch.com>"; $subject = "Validate your E-Mail Address"; $sql = "SELECT * FROM `developers` WHERE `email`='$email';"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); $id = $row['id']; $key = md5(date("M-d-Y H:i:s").date("r")."fsdwe89@s".$id.$username.$email); $sql = "INSERT INTO `verify` VALUES('$id', '$key');"; mysql_query($sql); $message = "Thank you for regestring with Developers Match.\n\r Please copy the link below, and paste it in your browser window:\r\n {$main_site_url}validate.php?id=$id&key=$key\r\n If you are unable to use this method to validate your account, you can go to\r\n {$main_site_url}?page=validator\r\n and enter the following key to activate your account:\r\n $key\r\n Thank you for registering,\r\n\r\n\r\n DevelopersMatch.com"; $headers = "From: $from\r\n"; mail($to, $subject, $message, $headers) or die("ERROR!"); header("location:./?page=register&register=success"); } ?>
  19. How would I sort it by the date and time and also what mysql type would I use to add this data in.
  20. Hello I am creating a new website and it involves a form which submits to a database. What I need it to do is find out the date and put that in the database. Then once this has done I need to select from the table sites and order it by date. Best Regards Steve
  21. Hey, Is it possible to allow a user to upload an attachment and then just send the file by mail. Also how do i validate the file type i want image files only. Thanks
  22. i know get this at the bottom Fatal error: Call to undefined function bottom() in /home1/jonsjava/public_html/developersmatch/developerform.php on line 343 What does this mean
  23. I get this back... #1054 - Unknown column 'design3.keyfield' in 'on clause'
×
×
  • 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.