Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. OK, replace: $temp1 = mysql_query("SELECT p.recID,r.refundNotes FROM purchased_leads p JOIN refundNotes r ON p.leadID=r.leadID WHERE p.leadID='{$_REQUEST[leadid]}'"); With: $temp1 = mysql_query("SELECT p.recID,r.refundNotes FROM purchased_leads p JOIN refundNotes r ON p.leadID=r.leadID WHERE p.leadID='{$_REQUEST[leadid]}'") or die('Error: ' . mysql_error()); This will tell you if the change to your database query is failing.
  2. invalid argument on what? Need more details.
  3. Judging by that, you need to look at the use of the date function. You have used the variable $joined in that function as the 2nd parameter. You should therefore look at how you define the variable $joined, and make sure it is a long number instead of a string, as that is the error that is printed back to you on the screen. Being that we have no idea what the variable $joined holds, that is all the help we can give you "quick".
  4. Database connect Select a database Query a database
  5. strtotime should work with dd/mm/yyyy. As it is part of the available date_formats
  6. And you have echo'd the sql queries so you can see how they are built. And you have checked for any errors returned from the database. And you have checked for any errors coming from the script.
  7. Of course it will not work like that. You are redefining the variable $temp, and if you are going to use alias' in your query, then you need to define the columns by them as well. if(strtolower($prev_status) == "refund requested" && strtolower($status) == "refund denied"){ //refund denied send denied email //grab customer data $temp1 = mysql_query("SELECT p.recID,r.refundNotes FROM purchased_leads p JOIN refundNotes r ON p.leadID=r.leadID WHERE p.leadID='{$_REQUEST[leadid]}'"); if(mysql_num_rows($temp1) > 0) { $row = mysql_fetch_row($temp1); $refund_notes = $row[1]; $cusid = $row[0]; } $temp2 = mysql_query("SELECT email, firstName, lastName FROM user WHERE recid = ({$cusid})"); if(mysql_num_rows($temp2)>0){ $customer_email = @mysql_result($temp, 0, 'email'); $customer_first_name = @mysql_result($temp, 0, 'firstName'); $customer_last_name = @mysql_result($temp, 0, 'lastName'); $refund_notes = @mysql_result($temp, 0, 'refundNotes'); $templatename = "reviewer_deny_refund"; $strings = Array ( '%FIRST_NAME%' => $customer_first_name, '%LAST_NAME%' => $customer_last_name, '%LEADID%' => $_REQUEST[leadid], '%EMAIL_ADDRESS%' => $customer_email, '%REFUND_NOTES%' => $refund_notes, '%SITE_NAME%' => $label['site_name'], '%REQUEST_DATETIME%' => date("Y-m-d H:i:s") ); // Format the e-mail $email_data = format_email($templatename, $strings); // Strings to replace in the subject line $strings = Array ( '%SITE_NAME%' => $label['site_name'], '%LEADID%' => $_REQUEST[leadid]); $email_data[subject] = format_subject($email_data[subject], $strings); // Send the e-mail if($customer_email !=""){ mail($customer_email, $email_data[subject], $email_data[message], "From: {$email_address[admin]}\r\n"); } } }
  8. Also, some browsers (Chrome being one) will not redirect unless you also set the Status to 200: header('Status: 200');
  9. $data = $_POST['textarea']; $rows = explode("\n",$data); $row_1 = $rows[0]; $row_2 = $rows[1]; //etc...
  10. If you use strip_tags(), then yes. Since there will be no entities to process.
  11. For the session variable. You are concatenating it. Which means PHP is looking for the variable so it can ADD to it. It gives the notice because it didn't find the index of that variable. For the Income, if it is not set, then just declare it. If it is set, then add to it. if(isset($income[$client][$currency])) { $income[$client][$currency] += $client_sum; } else { $income[$client][$currency] = $client_sum; }
  12. You are adding to an array key that is not defined. This is the one situation that I suppress the error (@).
  13. Undefined index is that you are accessing an array with an invalid key. As far as the $currency being un-defined, I bet you get a un-defined index on $row['currency'].
  14. Default font is set by the user in their browser. You can set a default font for your site using CSS. This will use your font if the users computer has that font installed on their system, otherwise it will use their default font.
  15. Neither do we. As we don't have your database tables, or any other information that could possibly point us to what is in $display['bad'].
  16. Replace: while($main_loop != 4) With: for($i = 0; $i < 5; $i++) Remove this line: $main_loop++;
  17. You are wanting the manager_id from the wrestling table, to match up to the bio table? $sql = "SELECT wr.*,bio.* FROM `efed_bio_wrestling` AS wr JOIN `efed_bio` AS bio ON (wr.manager_id = bio.id) WHERE wr.id = '$id'"; This should work, it is un-tested though.
  18. Pass the filename as a address. IE: $filename = 'http://localhost/test.php';
  19. There is an answer to your problem. You are using different collations for your account table. Even after setting these collations to the same as the others, I had to make sure the names were the same case, even though the table is case-insensitive. You cannot compare values between two (username) columns, if the collation on them is different. Fix the table, and solve the problem.
  20. Sure, this should work. $filename = 'myfile.php'; //file whos output you want to capture. $storageFile = 'myfile.html'; //file where you want to store the data. $file = file_get_contents($filename); file_put_contents($storageFile,$file);
  21. Would need to see the function called: "phpfmg_checkboxes()"
  22. Since your checkbox coding is not in the above code, I'll write it out. <html> <head> <script type="text/javascript"> function addCheck() { var s = document.getElementById('single'); var d = document.getElementById('double'); var t = document.getElementById('total'); if(s.checked == true) { t.value = 40; } if(d.checked == true) { t.value = 50; } } </script> </head> <body> <form> <input type="radio" value="40" id="single" name="persons" onclick="addCheck();" /><label for="single"> Single</label><br /> <input type="radio" value="50" id="double" name="persons" onclick="addCheck();" /><label for="single"> Double</label><br /> <input type="text" value=0 id="total" name="total" /><label for="total"> Total</label> </form></body> </html> This is only an example, load it up in your browser and see how it works.
  23. mysql_fetch_field just gets field names, and their information. So, this will be a short tutorial. (very short). //Make your database connection (not included). //Your query. $result = mysql_query('SELECT category_id FROM qa_vm_product_category_xref'); //Find out if this query returned rows. if(mysql_num_rows($result) > 0) { //If there are rows returned, get them. while($row = mysql_fetch_assoc($result)) { //print the row out. echo $row['category_id'] . '<br />'; //close the while loop. } //close the if } //if there are no rows returned you will see the following. else { echo 'No rows returned.'; }
  24. According to the manual, use the 'e' modifier on your [yt] search pattern.
  25. Try this. <?php $page = (isset($_GET['page'])) ? strip_tags($_GET['page']) : NULL; if(isset($_GET['username']) && $_GET['username'] != '') { $username = mysql_real_escape_string($_GET['username']); $query = "SELECT bio.username AS username, bio.posername AS posername, bio.charactername AS charactername, bio.id AS id, st.name AS style FROM `efed_bio` AS bio,efed_list_styles AS st WHERE bio.style_id = st.id AND bio.username = '$username'"; $result = mysql_query($query); if(mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); $row = array_map('cleanquerydata',$row); extract($row); } } ?> <div id="bio"> <h1><?php echo $charactername; ?>'s Biography</h1> <?php echo getBioMenu($username); if(file_exists('images/fullshots/' . $posername . '.png')){ echo '<img class="fullshot" src="images/fullshots/' . $posername . '.png" />'; } else{ echo '<img class="fullshot" src="images/fullshots/default.png" />'; } //Or if the GET page variable is gallery, display the gallery page if ($page == 'gallery') { echo getGallery($style,$id); }//If the GET page variable is news, display the news page elseif ($page == 'news') { echo getNews($$id); } //If the GET page variable is segments, display the segments page elseif ($page == 'segments') { echo getBioSegments($id,S); } //If the GET page variable is matches, display the matches page elseif ($page == 'matches') { echo getBioSegments($id,M); } elseif ($page == 'chronology') { echo getChronology($id); } //Otherwise display the bio else { echo getBio($style,$id); } ?> I only did the singles part. <?php function getBio($style, $uid) { $id = mysql_real_escape_string($uid); ?> <h2>Personal</h2> <?php if ($style=='singles') { $sql = "SELECT a.*,b.manager_id, b.nicknames, b.finisher, b.setup, b.music FROM efed_bio_singles AS a JOIN efed_bio_wrestling AS b ON (a.bio_id = b.bio_id) WHERE a.bio_id = '$id' LIMIT 1"; $re = mysql_query($sql); $row = mysql_fetch_assoc($re); extract($row); ?> <table class="biotable" cellspacing="10px"> <tr class="biotablerowa"> <td class="biotableheadingb">Nicknames:</td> <td class="biotabledatab"><?php echo (empty($nicknames)) ? "N/A" : $nicknames; ?></td> </tr> <tr class="biotablerowa"> <td class="biotableheadingb">Height:</td> <td class="biotabledatab"><?php echo $height; ?></td> </tr> <tr class="biotablerowb"> <td class="biotableheadingb">Weight:</td> <td class="biotabledatab"><?php echo $weight; ?></td> </tr> <tr class="biotablerowa"> <td class="biotableheadingb">Hometown:</td> <td class="biotabledatab"><?php echo $hometown; ?></td> </tr> </table> <?php } ?> <? if ($style=='tagteam') { ?> <? } ?> <? if ($style=='manager') { ?> <? } ?> <? if ($style=='referee') { ?> <? } ?> <? if ($style=='staff') { ?> <? } ?> <? if ($style=='stable') { ?> <? } ?> <h2>History</h2> <? echo getHistory($id); ?> <h2>Quotes</h2> <? echo getQuotes($id); ?> <h2>Wrestling</h2> <? echo getWrestling($id); ?> </div> <? }
×
×
  • 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.