Jump to content

daena76

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

About daena76

  • Birthday 04/11/1976

Contact Methods

  • Website URL
    http://www.mdyardsaleonline.com

Profile Information

  • Gender
    Female
  • Location
    Rockville, Maryland USA

daena76's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh crap, i totally forgot the important q! LOL ((((so sorry, i'm not here on earth at the moment)......:P Upon e-mailing member the e-mail script, it shows on the PASSWORD the username instead. Like... Username: madonna Password: madonna I don't know where it went wrong. I'm a baby in php. I appreciate it:-)
  2. ??? Where did i go wrong??? ======================== <? require_once("conn.php"); require_once("includes.php"); if(isset($_POST[s1])) { $expdate = time() + (365*24*60*60); $q1 = "insert into class_members set username = '$_POST[NewUsername]', password = '$_POST[p1]', FirstName = '$_POST[FirstName]', LastName = '$_POST[LastName]', Address = '$_POST[Address]', City = '$_POST[City]', State = '$_POST[State]', ZipCode = '$_POST[ZipCode]', Country = '$_POST[Country]', Phone = '$_POST[Phone]', AlternatePhone = '$_POST[AlternatePhone]', Fax = '$_POST[Fax]', email = '$_POST[email]', RegDate = '$t', AccountStatus = 'active', StandardAds = 10, ExpDate = '$expdate'"; mysql_query($q1); if(mysql_error()) { $error = "<font face=verdana size=2 color=red><b>The username <font color=black>$_POST[NewUsername]</font> is already in use!<br>Select another one, please!</b></font>"; unset($_POST[NewUsername]); } else { $last = mysql_insert_id(); $_SESSION[AgentID] = $last; $variable = "$_POST[NewUsername]  $_POST[FirstName]  $_POST[LastName]  $_POST[email] has just registered"; mail ('support@***********.com', 'New Member', $variable, 'From:support@*************.com'); $to = $_POST[email]; $subject = "Welcome to $_SERVER[HTTP_HOST]"; $message = "Hello $_POST[NewUsername],\n\nYour account was updated! You are able to post "; $my_message[] = "10 items every month"; if(!empty($my_message)) { $my_offers = implode("and", $my_message); } $MyDate = date("m/d/Y",$expdate); $message .= "$my_offers until $MyDate. That's a great start!\n\nHere's your login information:\n\nUsername: $_POST[NewUsername]\nPassword: $_POST[p1]\n\nThank you once again for joining our yard sale family! We hope you have fun in buying and selling around the neighborhood. See you around! \nsupport@**********.com\n$_SERVER[HTTP_HOST]"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); header("location:welcome.php"); exit(); } } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/RegistrationTemplate.php"); require_once("templates/FooterTemplate.php"); ?> ========================================
  3. I have a file "search.php" below that only picks up the search keywords from an item's "description". Some of my members do not repeat the product title/name on the description box as they see it redundant hence name/title is being ignored by the search query. What do I add to the code below so that it searches item titles too. (I have a classified ads site) Thanks :-) Any help is appreciated. ~danes <? require_once("conn.php"); require_once("includes.php"); if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } $ByPage = '20'; if($_GET[what]) { $query[] = " (class_catalog.Description like '%$_GET[what]%') and (class_catalog.CategoryID = class_categories.CategoryID) "; } if(!empty($_GET[c])) { $query[] = " class_catalog.CategoryID = class_categories.CategoryID and class_categories.CategoryID = '$_GET[c]' "; } if(!empty($_GET[m])) { $query[] = " class_catalog.CategoryID = class_categories.CategoryID and class_catalog.MemberID = '$_GET[m]' "; } if($_GET[rate] == "latest") { $query[] = " class_catalog.CategoryID = class_categories.CategoryID "; $order[] = " class_catalog.DatePosted desc "; } if($_GET[rate] == "top") { $query[] = " class_catalog.CategoryID = class_categories.CategoryID "; $order[] = " class_catalog.views desc "; } if(!empty($query)) { $MyQuery = implode(" and ", $query); } if(!empty($order)) { $MyOrder = implode(" and ", $order); } else { $MyOrder = " class_catalog.DatePosted desc "; } $q1 = " select * from class_catalog, class_categories where $MyQuery order by $MyOrder limit $Start, $ByPage "; $qnav = " select * from class_catalog, class_categories where $MyQuery "; $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) > '0') { $col = "white"; while($a1 = mysql_fetch_array($r1)) { if($col == "white") { $col = "dddddd"; } else { $col = "white"; } $DatePosted = date('d-M-Y', $a1[DatePosted]); if(!empty($a1[images])) { $image = "Yes"; } else { $image = "No"; } $SearchRows .= "<tr bgcolor=$col>\n\t<td><a class=BlackLink href=\"info.php?id=$a1[ProductID]\">$a1[ProductName]</a></td>\n\t<td><a class=BlueLink href=\"search.php?c=$a1[CategoryID]\">$a1[CategoryName]</a></td>\n\t<td>$DatePosted</td>\n\t<td>$image</td>\n</tr>\n\n"; } $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if($rows > $ByPage) { $Navigation .= "<br><table align=center width=580>"; $Navigation .= "<td align=center><font face=verdana size=2> | "; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " <span class=RedLink>$i2</span>\n\t "; } elseif($PageStart < $rows) { $links[] = " <a class=BlackLink href=\"search.php?Start=$PageStart&what=$_GET[what]&c=$_GET[c]&m=$_GET[m]&rate=$_GET[rate]\">$i2</a>\n\t "; } } $links2 = implode(" | ", $links); $Navigation .= $links2; $Navigation .= "| </td>"; $Navigation .= "</table><br>\n"; } require_once("templates/HeaderTemplate.php"); require_once("templates/ResultsTemplate.php"); require_once("templates/FooterTemplate.php"); } else { require_once("templates/HeaderTemplate.php"); require_once("templates/NoResultsTemplate.php"); require_once("templates/FooterTemplate.php"); } ?>
  4. [!--quoteo(post=384879:date=Jun 16 2006, 11:10 PM:name=homchz)--][div class=\'quotetop\']QUOTE(homchz @ Jun 16 2006, 11:10 PM) [snapback]384879[/snapback][/div][div class=\'quotemain\'][!--quotec--] I think you have to designate the $email variable as your email address, in the script. Or since this will only go to you just replace $email with your address. [/quote] Thanks a lot to both of you!! I now have an effective new user e-mail delivery. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
  5. [!--quoteo(post=384862:date=Jun 16 2006, 09:18 PM:name=aebstract)--][div class=\'quotetop\']QUOTE(aebstract @ Jun 16 2006, 09:18 PM) [snapback]384862[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hello, You're just wanting a simple mail sent to you whenever someone signs up? Try this: Right after this part: $last = mysql_insert_id(); $_SESSION[AgentID] = $last; Enter the following, but be sure to change around the information that you set variable to, set it to whatever you wish it to send to you. This variable will be the body of your email. $variable = "$_POST[FirstName] $_POST[LastName] has just registered"; mail ($email, 'New User', $variable, 'From: _____@____.com'); Also change $email to the variable or exact address you want this mail to be sent to. The from is straight forward, it can be a variable or exact wording also. Any questions, just ask. Hope this helps. [/quote] Hi! This is what I put in: $variable = "$_POST[FirstName] $_POST[LastName] $_POST[email] has just registered"; mail ($email, 'New User' $variable, 'From:pepsi@pepsi.kom'); It seems I did something wrong cuz I did not receive any e-mail. *sorry :-( i'm slow*
  6. I have a big problem. I got a membership script that does not notify web owner (me) of new sign-ups. Hence, no idea if someone registered and I can't activate membership. How and what do I add to the code below. The code here is the register.php file that points to the welcome page after a successful submit. (I am exceptionally a newbie so if you could just hold my hands and walk me through it, it'll be greeeeaat!) *wink TY ~Danes =================================================================== <? require_once("conn.php"); require_once("includes.php"); if(isset($_POST[s1])) { $q1 = "insert into class_members set username = '$_POST[NewUsername]', password = '$_POST[p1]', FirstName = '$_POST[FirstName]', LastName = '$_POST[LastName]', Address = '$_POST[Address]', City = '$_POST[City]', State = '$_POST[State]', ZipCode = '$_POST[ZipCode]', Country = '$_POST[Country]', Phone = '$_POST[Phone]', AlternatePhone = '$_POST[AlternatePhone]', Fax = '$_POST[Fax]', email = '$_POST[email]', RegDate = '$t' "; mysql_query($q1); if(mysql_error()) { $error = "<font face=verdana size=2 color=red><b>The username <font color=black>$_POST[NewUsername]</font> is already in use!<br>Select another one, please!</b></font>"; unset($_POST[NewUsername]); } else { $last = mysql_insert_id(); $_SESSION[AgentID] = $last; header("location:welcome.php"); exit(); } } //get the templates require_once("templates/HeaderTemplate.php"); require_once("templates/RegistrationTemplate.php"); require_once("templates/FooterTemplate.php"); ?> ================================================================
  7. [!--quoteo(post=376379:date=May 23 2006, 12:10 PM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ May 23 2006, 12:10 PM) [snapback]376379[/snapback][/div][div class=\'quotemain\'][!--quotec--] You havn't done a query statement to set the variable $a1 so you need sumet like $query=mysql_query("SELECT * FROM table WHERE ID='1'"); $a1=mysql_fetch_array($query); at the top of you page.. Regards Liam [/quote] Liam, Thanks for a quick response. I put this on top and still can't seem to make it work. If you see something in the query or don't see please let me know. Thanks a lot! <? require_once("../conn.php"); if(isset($_POST[s1])) { $q1 = "update class_catalog set Title = '$_POST[ProductName]', Description = '$_POST[Description]', Price = '$_POST[price]' where Title = '$_GET[ProductName]' "; mysql_query($q1); if(!mysql_error()) { echo "<br><center>Your item was updated successfully!</center>"; } else { echo mysql_error(); } } //get the member info $q1 = "select * from class_catalog where Price = '$_GET[Price]' "; $r1 = mysql_query($q1) or die(mysql_error()); $a1 = mysql_fetch_array($r1); ?>
  8. A newbie. I have a classified ads website and the client part where they edit their posting title, description, etc, etc. seem to disappear and not show. Client needs to re-type everything. What do I add or change in the script? Here's the script (assuming I got the right one) =========================================== <br> <form method=post name="PostForm" onsubmit="return CheckOffer();" enctype="multipart/form-data"> <table align=center width=400> <caption align=center> <font face=verdana size=2 color=black><b>Edit your ad</b></font> </caption> <tr> <td align=right>Asset type:</td> <td> <select name=ProductType> <option value="classified" <? if($a1[ProductType] == 'classifeid') { echo "selected"; } ?>>Classified</option> </select> </td> </tr> <tr> <td align=right>Category:</td> <td> <?=$SelectCategory?> </td> </tr> <tr> <td align=right>URL or domain:</td> <td><input type=text name=url value="<?=$a1[url]?>" size=31></td> </tr> <tr> <td align=right>Title:</td> <td><input type=text name=ProductName value="<?=$a1[ProductName]?>" size=31></td> </tr> <tr> <td align=right valign=top>Description:</td> <td><textarea name=Description rows=6 cols=30><?=$a1[Description]?></textarea></td> </tr> <tr> <td align=right valign=top>Images:</td> <td><?=$ShowImages?></td> </tr> <tr> <td align=right>Price:</td> <td><input type=text name=Price size=6 value="<?=$a1[Price]?>"> <font face=verdana size=1>format: <b>125.95</b></font></td> </tr> <tr> <td align=right>Priority:</td> <td><?=$SelectPriority?></td> </tr> <tr> <td> </td> <td style="padding-top:15"> <input type=hidden name=OldImages value="<?=$OldImages?>"> <input type=submit name=s1 value="Update"> </td> </tr> </table> </form> <br><br> <?=$ListMemberAsset?> ========================================== Any help is greatly appreciated. Thanks :-)
×
×
  • 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.