Jump to content

hyipcharts

Members
  • Posts

    8
  • Joined

  • Last visited

hyipcharts's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hyipcharts

    contact form

    Thanks Ankit,I used the script and it sent the mail . I sent it twice, but received 3. Anyway it does work. In the from box I get hyipcharts@p3blahblahblah.blah.secureserver.netI will review your link and see if it could help.Thanks again
  2. hyipcharts

    contact form

    Thanks for the feed back. I also cannot find an error in the code. My config/config file has the usual database info.<?phpdefine('dbHOST', 'localhost');define('dbNAME', 'dbname);define('dbUSER', 'user);define('dbPASS', 'password');define('PageAddress', 'www.hyipcharts.com');define('PageTitle', 'HYIPCHARTS - Charting the world of HYIPS');define('AdminMail', 'admin@hyipcharts.com');@mysql_connect(dbHOST, dbUSER, dbPASS) or die('<div class="error">Cannot connect to database!</div>');@mysql_select_db(dbNAME) or die('No database!');If I only had the contact form I would rewrite it. However, I have a vote and lost password function which relies on email. I have tried all of them and nothing works. I get no errors, but receive no mail.I am at a complete loss. If anyone wants more info please let me know. It is very important that this work.Thanks
  3. hyipcharts

    contact form

    Hi all, I have finished my script and installed it on my site yesterday. hyipchartsIt has three places where I receive email. None of them are working. I know the settings are all correct on the hosting side, it worked with the old script. If anyone could take a look at the code and see if there are any mistakes I am missing.It does not give me any errors. I just don't receive the emails. [code]<?php $PageTitle='Contact'; require_once('config/config.php'); require_once('config/func.php'); $name=stripslashes(htmlspecialchars($_POST['name'])); $mail=$_POST['mail']; $msg=stripslashes(htmlspecialchars($_POST['msg'])); if ($_POST['go']==1) { if(!empty($mail) && !empty($name) && !empty($msg)) { if ($_SESSION['uniqCode']==$_POST['ui']) { session_unregister('uniqCode'); if(preg_match("/.+@.+\..+/", $mail)) { $message="Name: $name E-mail: $mail Message: $msg"; if(mail(AdminMail, 'Message from feedback form', $message, "FROM: ". PageTitle ."<>")) { mail($mail, 'Thanks for sending message', 'Thanks for sending message to the administrator of '. PageTitle, "FROM: ". PageTitle ."<>"); unset($name, $mail, $msg, $_POST['go']); $added=true; } else $error='Error occured when trying to send your message to administrator.'; } else $error='Incorrect e-mail address!'; } else $error='Thanks for sending message'; } else $error='Fill all fields!'; } require('config/begin.php');?> <table width="600" border="0" align="center"> <tr> <td> <h1>Contact</h1> </td> </tr> <tr> <td> <?php $t=explode(' ', microtime()); $uniqCode=uniqid($t[1]); session_register('uniqCode'); if(strlen($error)) error($error); elseif($added===true) echo('<div class="msg">Message was sent to administrator. Thank you.</div>'); ?> <form method="post" style="margin: 0px"> <input type="hidden" name="go" value="1"> <input type="hidden" name="ui" value="<?php echo $uniqCode ?>"> <table width="400" align="center" border="0"> <tr> <td width="60">Name:</td><td width="340"><input type="text" size="20" maxlength="20" name="name" value="<?php echo $name ?>"></td> </tr> <tr> <td>E-mail:</td><td><input type="text" size="20" maxlength="32" name="mail" value="<?php echo $mail ?>"></td> </tr> <tr> <td valign="top">Message:</td><td><textarea cols="40" rows="8" name="msg"><?php echo $msg ?></textarea></td> </tr> <tr> <td colspan="2" align="center"> <input type="reset" value=" RESET "> <input type="button" value=" SUBMIT " onClick="this.form.submit();this.disabled=true"> </td> </tr> </table> </form> </td> </tr></table><?php require('config/end.php');?>[/code]If my config file it calls the email address.Thanks in advance
  4. Thanks for that. It could be something I missed. I will recheck the code and see if it is calling the db. Thanks again.
  5. Hey again,On to problem #2. When a person joins my site they have to be approved by admin to be listed. In my admin area I have a waiting list and I click on approve or decline. However, when I click on approve or decline nothing happens. The page only refreshes. Is there another way to write this code? <td valign=top width=33%> <a href="?a=approve_listing&lid='; echo $list['id']; echo '&gid='; echo $frm['gid']; echo '&p='; echo $frm['p']; echo '&return=new_listings">[approve]</a><br> Thanks in advance
  6. Thanks vijay,However, this gives me a fatal error: Fatal error: Call to undefined function now()I will continue to play with it and try to get it going.Thanks again
  7. Hey all and thanks in advance for any help.I am using mysql v5 running on localhost with wamp.I have rewritten this code many times and tried different syntax options. I am still getting the same error. Maybe I need another set of eyes.errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'out) as tout from traffic where listing_id = 1 and date + interval 7 day > now()' at line 1code $row['avg_vote'] = $avg_vote; $row['cvotes'] = $votes_all; $q = 'select sum('in') as tin, sum('out') as tout from traffic where listing_id = '. $row['id'] . 'and date + interval . $settings['traffic_count_days'] . 'day > now()'; if (!($ssth = mysql_query ($q))) { exit (mysql_error ()); ; } $traffic = mysql_fetch_array ($ssth); $row['in'] = intval ($traffic['tin']); $row['out'] = intval ($traffic['tout']); $row['traffic_ratio'] = ($traffic['tout'] == 0 ? '0.0' : sprintf ('%.01f', $traffic['tin'] / $traffic['tout'])); array_push ($listings, $row);Thanks again for any help.
×
×
  • Create New...