Jump to content

Deanznet

Members
  • Posts

    220
  • Joined

  • Last visited

Everything posted by Deanznet

  1. Qucik Question Right when it displays it gose down in a straigh line.. Is their anyway i can make it display 3 images and than per line so like this - represents and image - - - - - - - - - and so on... Also is their a way to make the images all 100 px by 100 px
  2. Dude Wow! That worked real good... Haha echo "<img src='$basename' alt='$keywords' /><br>Keywords: $keyworks<br>"; You put keyworks instead of keywords lol...
  3. Hey i have created a Image Upload. and i want to add a search... to it I made it so when users upload they have to enter keywords inside it gose into a table called images and than into the keywords row.. Also i have another row inside table that called basename witch has the url to the image.. So what i wanted to do is make a php form to search for images that searchs for keywords... And displays the picture as a thumbnail... in a neat way on the page.. Anyone can help?
  4. Kinda fixed it now i get Warning: Invalid argument supplied for foreach() in /home/content/c/h/a/changeme/html/crapp.php on line 250 Witch is the foreach code...
  5. K i did the Html part... But the php part gives me an error <? foreach($attached as $file){ if( $_POST['submit'] && $_FILES['attached']['name'] ){ $ok_filetypes = explode("|",$att_filetypes); if (!$_FILES['attached']['error'] && $_FILES['attached']['size'] > $att_max_size*1024){ errform('Sorry, but the attached file is too large. Please reduce the size of it\'s contents.'); // #err $step = 1; } $filename = (!$_FILES['attached']['error'] ? substr( basename($_FILES['attached']['name']), -30 ) : ''); $x = strtolower( substr($_FILES['attached']['name'], -3)); if($filename && !in_array($x, $ok_filetypes) ){ errform('Sorry, the filetype you have tried to upload is not allowed.'); $step = 1; } if(!$posterr){ if(!isset($_GET["ipaddress"]) || ($_GET["ipaddress"] == "")) { $ipaddress = $_SERVER['REMOTE_ADDR']; $local = 1; } else { $ipaddress = $_GET["ipaddress"]; $local = 0; } $uniq = substr( md5(uniqid (rand())), 0, 10 ); $ext = strtolower( substr($_FILES['attached']['name'], -3)); move_uploaded_file($_FILES['attached']['tmp_name'], $att_path."/".$uniq.".".$ext ); $strQuery = "INSERT INTO images SET "; $strQuery .= "filename='".$uniq.".".$ext."',"; $strQuery .= "ipaddress='{$ipaddress}',"; $strQuery .= "date='".time()."',"; $strQuery .= "pkey='{$uniq}',"; if($myuid){ $strQuery .= "user='{$myuid}',"; } $strQuery .= "status='1'"; $result = mysql_query($strQuery) or die( mysql_error() ); $aid = mysql_insert_id(); if($aid){ $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$uniq.".".$ext; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); $step = 2; }else{ $step = 1; } } }else{ $step = 1; } if($step == 1){ ?> That right? Error: Parse error: parse error, unexpected $ in upload.php on line 393
  6. Hey Im trying to fix this so my users can upload more than 1 file at a time... Heres the code for the html.. <form ENCTYPE="multipart/form-data" method="post" name="form1" action="upload.php"> <div align="center"> <INPUT NAME="attached" TYPE="file" size="50"> <br> File extensions allowed: <b> <?=implode("</b>, <b>",explode("|",$att_filetypes))?> </b><br> File size limit: <b> <?=$att_max_size?> KB</b> Than after it is posted it gose to upload.php witch has this code: <? if( $_POST['submit'] && $_FILES['attached']['name'] ){ $ok_filetypes = explode("|",$att_filetypes); if (!$_FILES['attached']['error'] && $_FILES['attached']['size'] > $att_max_size*1024){ errform('Sorry, but the attached file is too large. Please reduce the size of it\'s contents.'); // #err $step = 1; } $filename = (!$_FILES['attached']['error'] ? substr( basename($_FILES['attached']['name']), -30 ) : ''); $x = strtolower( substr($_FILES['attached']['name'], -3)); if($filename && !in_array($x, $ok_filetypes) ){ errform('Sorry, the filetype you have tried to upload is not allowed.'); $step = 1; } if(!$posterr){ if(!isset($_GET["ipaddress"]) || ($_GET["ipaddress"] == "")) { $ipaddress = $_SERVER['REMOTE_ADDR']; $local = 1; } else { $ipaddress = $_GET["ipaddress"]; $local = 0; } $uniq = substr( md5(uniqid (rand())), 0, 10 ); $ext = strtolower( substr($_FILES['attached']['name'], -3)); move_uploaded_file($_FILES['attached']['tmp_name'], $att_path."/".$uniq.".".$ext ); $strQuery = "INSERT INTO images SET "; $strQuery .= "filename='".$uniq.".".$ext."',"; $strQuery .= "ipaddress='{$ipaddress}',"; $strQuery .= "date='".time()."',"; $strQuery .= "pkey='{$uniq}',"; if($myuid){ $strQuery .= "user='{$myuid}',"; } $strQuery .= "status='1'"; $result = mysql_query($strQuery) or die( mysql_error() ); $aid = mysql_insert_id(); if($aid){ $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$uniq.".".$ext; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); $step = 2; }else{ $step = 1; } } }else{ $step = 1; } if($step == 1){ ?> Please can somebody help!
  7. Hey their im trying to help a friend out.. He had an old shopping cart but now he wanted to setup 1 on 1shoppingcart... he also has a gateway.. What is a gateway... And also anyone got tutorials on 1shoppingcart?
  8. Hey everyone.. im looking for a shopping cart that.. changes the price based on how many pc of the item they order.. for example 1-25 pc is like $10 25-100 is $5 ect... anyone know anything?
  9. Okay, I have a website like imageshack.... and i want to add a check box with the optoins to choose the size to change the image to... any idea how i can do this.. any tut cause im really neww to php
  10. anyone can help edit this code. i really dont know what im doing
  11. Ya still not working and it shows the username and pw on the top... now Thats what i got so far... i really dont understand the other stuff you said LOl
  12. This is my php code for the login page. It wont login tho... Every time i hit submit it gose back to the login page... Any idea?
  13. Thanks alot businessman332211! Still wont work, but we are pretty close. it wont email it, Anyone else want to try?
  14. I fixed the error, but it wont send an email, This is the page where the user enters their email and hits submit, [code]<? include("include/header.php"); ?> <p><font face=arial size=3> </font><form action="emailp.php" method="POST"> <font size="3" face="arial"><br> <br> <b><font size="2">Email</font></b><br> <input type=text name=email size=30 tabindex="2" maxlength="25"> <i>[type in your email you registered with]</i><br> <br> <input type="submit" name="" value="Get password" tabindex="4" style="background-color:#e5e5e5; color:#000000; font-family:Verdana,Arial; font-weight: bold; font-size: 11px; border-left: 1 solid #a0a0a0; border-top: 1 solid #a0a0a0; border-right: 1 solid #000000; border-bottom: 1 solid #000000; padding: 2 2 2 2; outline: #a0a0a0 solid 2px;"> <br><br> </font> </form> </p> <? include("include/footer.php"); ?>[/code] Here is the page it calls on [code]<?         include("include/emails.php");   include("include/common.php");         $subject = "Forgotten password";         $result = mysql_query("SELECT username, pass FROM users WHERE user_email = '" . $_REQUEST['submitted_email'] . "'");         if($result && mysql_num_rows($result) == 1)         {             $row = mysql_fetch_row($result);             $message = "Your username: " . $row['username'] . "<br>Your password: " . $row['pass'];             mail($_REQUEST['submitted_email'],$subject,$message,"From: $adminemail");         }           ?>[/code]
  15. I get an error <?         include("include/emails.php");         $subject = "Forgotten password";         $result = mysql_query("SELECT username, pass FROM users WHERE user_email = '" . $_REQUEST['submitted_email'] . "'");         if($result && mysql_num_rows($result) == 1)         {             $row = mysql_fetch_row($result);             $message = "Your username: " . $row['$username'] . "<br>"Your password: " . $row['$password'];             mail($_REQUEST['submitted_email'],$subject,$message,"From: $adminemail");         }                   ?>
  16. Okay Most of the stuff here has been fixed thanks to ben,  i have a problem trying to get it to email passwords if a user forgets, this is what i got so far. [code]<?         include("include/emails.php");                 mail($semail,$subject,$message,"From: $adminemail");         $adminsignupmessage = str_replace("<username>","$susername",$adminsignupmessage);         $adminsignupmessage = str_replace("<password>","$spassword",$adminsignupmessage);         $adminsignupmessage = str_replace("<member_email>","$semail",$adminsignupmessage);         $subject = "$adminsignupsubject";         $message = "$adminsignupmessage";         mail($adminemail,$subject,$message,"From: $adminemail");         $nowdate = date("M d, Y");         mysql_query("SELECT username, pass FROM users WHERE user_email = '" . $_REQUEST['submitted_email'] . "'";         echo "<h3>Your Password Has Been Sent./h3>$table2             <tr><td align=center>We have sent you a welcome email to <b>$semail</b> with your password.</table>"; ?>[/code]
  17. [code]<?   include("include/common.php");   include("include/header.php"); ?> <?   $submit1 = $_POST['submit1'];   $submit2 = $_POST['submit2'];   $submit3 = $_POST['submit3'];   if($submit1 == "1") {       if($requirepaid) { ?>         <h3>Signup for a New Account Step 1</h3><form method=post>         <?=$table2?>         <tr align=center>             <td colspan=3>Select a Username. A password will be generated and emailed to you at the end of the signup process.<p></td>         </tr> <?        include("include/paidsignupform.php");  ?>         </table>         </form> <?       }       if(!$requirepaid) { ?>         <h3>Signup for a New Account Step 1</h3><form method=post>         <?=$table2?>         <tr align=center>             <td colspan=2>Fill out the form below. A password will be generated and emailed to you.<p></td>         </tr> <?        include("include/nopaidsignupform.php");  ?>         </table></form> <?       }   }else if($submit1 == "2") { ?>       <h3>Signup for a New Account</h3>       <?=$table2?>       <tr align=center>         <td colspan=2>Press your browser's 'Back' key and click 'I Agree' to our terms and conditions to continue the signup process.<p></td>       </tr> <?   }else if($submit2) {       $susername = $_POST['susername'];       if(!ereg("^[A-Za-z0-9_]{1,16}$",$susername)) {         $serror="Invalid username! Use no more than 15 characters and only letters, numbers, and underscores.<br>";       }       $this->c=@mysql_query("select username from users where username='$susername'");       $this->d=mysql_fetch_object($this->c);       if(is_object($this->d)) { $serror="Username is already in use<br>"; }       $this->c=@mysql_query("select username from pending where username='$susername'");       $this->d=mysql_fetch_object($this->c);       if(is_object($this->d)) { $serror="Username is already in use<br>"; }       echo "<h3>Signup for a New Account Step 3</h3>";       if (!$serror) {         $nowtime = time();         mysql_query("insert into Pending (username,since) values ('$susername','$nowtime')"); ?>         <form action="https://www.paypal.com/cgi-bin/webscr" method="post">         <?="$table2";?>         <tr>             <td align=center>               Click the button below to signup for our <?=$paypal_sub?> subscription through PayPal.               The first 7 days are free, and you can cancel anytime before the 7 days are up               and be charged nothing.<p>               <input type="hidden" name="cmd" value="_xclick-subscriptions">               <input type="hidden" name="no_shipping" value="1">               <input type="hidden" name="no_note" value="1">               <input type="hidden" name="p3" value="1">               <input type="hidden" name="t3" value="<?=$paypal_subcode?>">               <input type="hidden" name="a1" value="0.00">               <input type="hidden" name="src" value="1">               <input type="hidden" name="sra" value="1">               <input type="hidden" name="business" value="<?="$paypal_email";?>">               <input type="hidden" name="item_name" value="<?="$paypal_item";?>">               <input type="hidden" name="item_number" value="<?="$paypal_item_number";?>">               <input type="hidden" name="a3" value="<?="$paypal_price";?>">               <input type="hidden" name="notify_url" value="<?="$paypal_ipn";?>">               <input type="hidden" name="cancel_return" value="<?="$paypal_cancel_return";?>">               <input type="hidden" name="return" value="<?="$paypal_return";?>">               <input type="hidden" name="os0" value="<?="$susername";?>">               <input type="hidden" name="on0" value="Username">               <input type="submit" value="Subscribe now">             </td>         </tr>         </table></form> <?       }       if ($serror) { ?>         <form method=post>         <?=$table2?>         <tr align=center>             <td colspan=3><font color=red><?=$serror?></font><p></td>         </tr> <?        include("include/paidsignupform.php");  ?>         </table></form> <?       }   }else if($submit3) {       $susername = $_POST['susername'];        $spassword = $_POST['spassword'];       $sfirst_name = $_POST['sfirst_name'];       $slast_name = $_POST['slast_name'];       $sstreet = $_POST['slast_namesstreet'];       $scity = $_POST['scity'];       $sstate = $_POST['sstate'];       $szip = $_POST['szip'];       $scountry = $_POST['scountry'];       $semail = $_POST['semail'];       $stelephone = $_POST['semailstelephone'];       if(!ereg("^[A-Za-z0-9_]{1,16}$",$susername)) {         $serror="Invalid username! Use no more than 15 characters and only letters, numbers, and underscores.<br>";       }     if ($semail == "") $err .= "Please provide your email address<br>";     if ($semail != "" && !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $semail))     $err.= $semail. " is not a valid email address.<br/>";       $this->c=@mysql_query("select username from users where username='$susername'");       $this->d=mysql_fetch_object($this->c);       if(is_object($this->d)) { $serror="Username is already in use<br>"; }       $this->c=@mysql_query("select username from pending where username='$susername'");       $this->d=mysql_fetch_object($this->c);       if(is_object($this->d)) { $serror="Username is already in use<br>"; }       if (!$serror) {         mt_srand((double)microtime()*1000000^getmypid());         $pass_length = mt_rand($this->min_pass_length,$this->max_pass_length);         while(strlen($spassword)<$pass_length) {             $spassword.=substr($this->chars,(mt_rand()%strlen($this->chars)),1);         }         include("include/emails.php");         $signupmessage=str_replace("<username>","$susername",$signupmessage);         $signupmessage=str_replace("<password>","$spassword",$signupmessage);         $signupmessage=str_replace("<first_name>","$sfirst_name",$signupmessage);         $signupmessage=str_replace("<last_name>","$slast_name",$signupmessage);         $signupmessage=str_replace("<login_url>","$login_url",$signupmessage);         $subject = "$signupsubject";         $message = "$signupmessage";         mail($semail,$subject,$message,"From: $adminemail");         $adminsignupmessage = str_replace("<username>","$susername",$adminsignupmessage);         $adminsignupmessage = str_replace("<password>","$spassword",$adminsignupmessage);         $adminsignupmessage = str_replace("<first_name>","$sfirst_name",$adminsignupmessage);         $adminsignupmessage = str_replace("<last_name>","$slast_name",$adminsignupmessage);         $adminsignupmessage = str_replace("<member_email>","$semail",$adminsignupmessage);         $subject = "$adminsignupsubject";         $message = "$adminsignupmessage";         mail($adminemail,$subject,$message,"From: $adminemail");         $nowdate = date("M d, Y");         mysql_query("insert into users (uid, username, password, first_name, last_name, street, city, state, zip, country, email, telephone, last_paid, signup_date) values ('','$susername', '$spassword', '$sfirst_name', '$slast_name', '$sstreet', '$scity', '$sstate', '$szip', '$scountry', '$semail', '$stelephone', 'free', '$nowdate')");         echo "<h3>Signup for a New Account Complete</h3>$table2             <tr><td align=center>Thank you for signing up $susername. We have sent you a welcome email to <b>$semail</b> with your password.</table>";       }       if ($serror) { ?>         <h3>Signup for a New Account Step 3</h3>         <form method=post>         <?=$table2?>         <tr align=center>             <td colspan=3><font color=red><?=$serror?></font><p></td>         </tr> <?        include("include/nopaidsignupform.php");  ?>         </table></form> <?       }   }else { ?>       <h3>Signup for a New Account Step 1</h3>       <?=$table2?>       <tr>         <td align=center>             Please read through our terms and conditions below and click 'I Agree' to continue with the signup process.<p>             <font size=3><b>Terms and Conditions</b></font><p>             <form method=post><textarea name=textfield cols=60 rows=15 wrap=virtual> <?      include "include/terms.php";  ?>             </textarea><p><input type=radio name=submit1 value=1> I Agree<br><input type=radio name=submit1 value=2> I Disagree<p><input type=submit value='Next Step -->'></form>         </td>       </tr>       </table> <?   }   include("include/footer.php"); ?>[/code]
  18. I need some help Maybe you can help cause i have no knowlege of php, I got about 3 or 4 Problems, Here We go! My Problem is, #1 When Some one registers i want it to be able to Require their email, #2 When people Register For some Reason THey never Get them Email with their passwords #3 The login Page Never lets anyone login. Here my MYsql [code]CREATE TABLE users ( uid int(11) NOT NULL auto_increment, username varchar(50) default NULL, password varchar(50) default NULL, first_name varchar(20) NOT NULL default '', last_name varchar(35) NOT NULL default '', street varchar(100) NOT NULL default '', city varchar(40) NOT NULL default '', state varchar(5) NOT NULL default '', zip varchar(10) NOT NULL default '', country varchar(40) NOT NULL default '', email varchar(100) NOT NULL default '', telephone varchar(12) NOT NULL default '', last_paid varchar(50) NOT NULL default '', signup_date varchar(50) NOT NULL default '', status int(11) NOT NULL default '1', PRIMARY KEY  (uid) ) TYPE=MyISAM; CREATE TABLE pending ( id int(255) unsigned NOT NULL auto_increment, username varchar(15) NOT NULL default '', since varchar(50) NOT NULL default '', PRIMARY KEY  (id) ) TYPE=MyISAM; CREATE TABLE images ( id int(11) NOT NULL auto_increment, filename text NOT NULL, ipaddress text NOT NULL, date int(11) NOT NULL default '0', status tinyint(4) NOT NULL default '1', pkey varchar(25) NOT NULL default '', user int(11) NOT NULL DEFAULT '0', PRIMARY KEY  (id) ) TYPE=MyISAM AUTO_INCREMENT=30 ; CREATE TABLE gallery( id int(11) NOT NULL auto_increment, name text NOT NULL, user int(11) NOT NULL default '0', PRIMARY KEY  (id) ) TYPE=MyISAM; CREATE TABLE gitem( id int(11) NOT NULL auto_increment, gid int(11) NOT NULL default '0', image int(11) NOT NULL default '0', PRIMARY KEY  (id) ) TYPE=MyISAM; [/code] This is the registration page [code]<? include("include/common.php"); include("include/header.php"); ?> <? $submit1 = $_POST['submit1']; $submit2 = $_POST['submit2']; $submit3 = $_POST['submit3']; if($submit1 == "1") { if($requirepaid) { ?> <h3>Signup for a New Account Step 1</h3><form method=post> <?=$table2?> <tr align=center> <td colspan=3>Select a Username. A password will be generated and emailed to you at the end of the signup process.<p></td> </tr> <? include("include/paidsignupform.php"); ?> </table> </form> <? } if(!$requirepaid) { ?> <h3>Signup for a New Account Step 1</h3><form method=post> <?=$table2?> <tr align=center> <td colspan=2>Fill out the form below. A password will be generated and emailed to you.<p></td> </tr> <? include("include/nopaidsignupform.php"); ?> </table></form> <? } }else if($submit1 == "2") { ?> <h3>Signup for a New Account</h3> <?=$table2?> <tr align=center> <td colspan=2>Press your browser's 'Back' key and click 'I Agree' to our terms and conditions to continue the signup process.<p></td> </tr> <? }else if($submit2) { $susername = $_POST['susername']; if(!ereg("^[A-Za-z0-9_]{1,16}$",$susername)) { $serror="Invalid username! Use no more than 15 characters and only letters, numbers, and underscores.<br>"; } $this->c=@mysql_query("select username from users where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Username is already in use<br>"; } $this->c=@mysql_query("select username from pending where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Username is already in use<br>"; } echo "<h3>Signup for a New Account Step 3</h3>"; if (!$serror) { $nowtime = time(); mysql_query("insert into Pending (username,since) values ('$susername','$nowtime')"); ?> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <?="$table2";?> <tr> <td align=center> Click the button below to signup for our <?=$paypal_sub?> subscription through PayPal. The first 7 days are free, and you can cancel anytime before the 7 days are up and be charged nothing.<p> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="<?=$paypal_subcode?>"> <input type="hidden" name="a1" value="0.00"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <input type="hidden" name="business" value="<?="$paypal_email";?>"> <input type="hidden" name="item_name" value="<?="$paypal_item";?>"> <input type="hidden" name="item_number" value="<?="$paypal_item_number";?>"> <input type="hidden" name="a3" value="<?="$paypal_price";?>"> <input type="hidden" name="notify_url" value="<?="$paypal_ipn";?>"> <input type="hidden" name="cancel_return" value="<?="$paypal_cancel_return";?>"> <input type="hidden" name="return" value="<?="$paypal_return";?>"> <input type="hidden" name="os0" value="<?="$susername";?>"> <input type="hidden" name="on0" value="Username"> <input type="submit" value="Subscribe now"> </td> </tr> </table></form> <? } if ($serror) { ?> <form method=post> <?=$table2?> <tr align=center> <td colspan=3><font color=red><?=$serror?></font><p></td> </tr> <? include("include/paidsignupform.php"); ?> </table></form> <? } }else if($submit3) { $susername = $_POST['susername']; $spassword = $_POST['spassword']; $sfirst_name = $_POST['sfirst_name']; $slast_name = $_POST['slast_name']; $sstreet = $_POST['slast_namesstreet']; $scity = $_POST['scity']; $sstate = $_POST['sstate']; $szip = $_POST['szip']; $scountry = $_POST['scountry']; $semail = $_POST['semail']; $stelephone = $_POST['semailstelephone']; if(!ereg("^[A-Za-z0-9_]{1,16}$",$susername)) { $serror="Invalid username! Use no more than 15 characters and only letters, numbers, and underscores.<br>"; } $this->c=@mysql_query("select username from users where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Username is already in use<br>"; } $this->c=@mysql_query("select username from pending where username='$susername'"); $this->d=mysql_fetch_object($this->c); if(is_object($this->d)) { $serror="Username is already in use<br>"; } if (!$serror) { mt_srand((double)microtime()*1000000^getmypid()); $pass_length = mt_rand($this->min_pass_length,$this->max_pass_length); while(strlen($spassword)<$pass_length) { $spassword.=substr($this->chars,(mt_rand()%strlen($this->chars)),1); } include("include/emails.php"); $signupmessage=str_replace("<username>","$susername",$signupmessage); $signupmessage=str_replace("<password>","$spassword",$signupmessage); $signupmessage=str_replace("<first_name>","$sfirst_name",$signupmessage); $signupmessage=str_replace("<last_name>","$slast_name",$signupmessage); $signupmessage=str_replace("<login_url>","$login_url",$signupmessage); $subject = "$signupsubject"; $message = "$signupmessage"; mail($semail,$subject,$message,"From: $adminemail"); $adminsignupmessage = str_replace("<username>","$susername",$adminsignupmessage); $adminsignupmessage = str_replace("<password>","$spassword",$adminsignupmessage); $adminsignupmessage = str_replace("<first_name>","$sfirst_name",$adminsignupmessage); $adminsignupmessage = str_replace("<last_name>","$slast_name",$adminsignupmessage); $adminsignupmessage = str_replace("<member_email>","$semail",$adminsignupmessage); $subject = "$adminsignupsubject"; $message = "$adminsignupmessage"; mail($adminemail,$subject,$message,"From: $adminemail"); $nowdate = date("M d, Y"); mysql_query("insert into users (uid, username, password, first_name, last_name, street, city, state, zip, country, email, telephone, last_paid, signup_date) values ('','$susername', '$spassword', '$sfirst_name', '$slast_name', '$sstreet', '$scity', '$sstate', '$szip', '$scountry', '$semail', '$stelephone', 'free', '$nowdate')"); echo "<h3>Signup for a New Account Complete</h3>$table2 <tr><td align=center>Thank you for signing up $susername. We have sent you a welcome email to <b>$semail</b> with your password.</table>"; } if ($serror) { ?> <h3>Signup for a New Account Step 3</h3> <form method=post> <?=$table2?> <tr align=center> <td colspan=3><font color=red><?=$serror?></font><p></td> </tr> <? include("include/nopaidsignupform.php"); ?> </table></form> <? } }else { ?> <h3>Signup for a New Account Step 1</h3> <?=$table2?> <tr> <td align=center> Please read through our terms and conditions below and click 'I Agree' to continue with the signup process.<p> <font size=3><b>Terms and Conditions</b></font><p> <form method=post><textarea name=textfield cols=60 rows=15 wrap=virtual> <? include "include/terms.php"; ?> </textarea><p><input type=radio name=submit1 value=1> I Agree<br><input type=radio name=submit1 value=2> I Disagree<p><input type=submit value='Next Step -->'></form> </td> </tr> </table> <? } include("include/footer.php"); ?>[/code] This is the Login Page [code]<? include("include/common.php"); if( $_POST['username'] && $_POST['password'] ){ $failed = 1; $username = $_POST['username']; $password = $_POST['password']; $query = "SELECT * FROM users WHERE username='$username' AND password='$password'"; # echo $query; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); if ( ($result) && (mysql_num_rows($result) > 0) ){ $row = mysql_fetch_object($result); $adlogin = $row->username; $myname = $row->username; $adpassword = $row->password; $myuid = $row->uid; # echo $adlogin." ----".$adpassword."<br>"; if ( ($username != $adlogin) || ($password != $adpassword) ){ $failed = 1; }else{ $failed = 0; $loggedin = 1; session_register("loggedin"); session_register("myuid"); session_register("myname"); } }else{ $failed = 1; } } if($loggedin){ ob_start(); header("Location: account.php"); } include("include/header.php"); ?> <p><font face=arial size=3> <form action="login.php" method="POST"> <input type="hidden" name="action" value="login"><font face="arial" size="2"><b>Username</b><br> <input type=text name=username size=30 tabindex="1" maxlength="12"><i>[type in your username]</i></font><br> <font face="arial" size="2"><br> <b>Password</b><br> <input type=password name=password size=30 tabindex="2" maxlength="12"><i>[type in your password]</i></font><br> <br> <font face="arial" size="2"><input type="submit" name="" value="Login" tabindex="4" style="background-color:#e5e5e5; color:#000000; font-family:Verdana,Arial; font-weight: bold; font-size: 11px; border-left: 1 solid #a0a0a0; border-top: 1 solid #a0a0a0; border-right: 1 solid #000000; border-bottom: 1 solid #000000; padding: 2 2 2 2; outline: #a0a0a0 solid 2px;"> <br><br> </font> <table border="0" cellpadding="0" cellspacing="0" width="178"> <tr height="19"> <td height="19" valign="top"> <font face="arial" size="2"><b><a href="mailto:<?=$adminemail?>?subject=<?=$sitename?>/Password"><b>Forgot Your Password?</b></a></b></font> </td> </tr> <tr height="18"> <td valign="bottom" height="18"> <font face="arial" size="2"><b><a href="/join.php"><b>Register New Account!</b></a></b></font> </td> </tr> </table> </form> </font></p> <? include("include/footer.php"); ?>[/code] Let me know please! i need some 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.