Jump to content

IndianaGuy

Members
  • Content count

    82
  • Joined

  • Last visited

Community Reputation

0 Neutral

About IndianaGuy

  • Rank
    Newbie
  1. email at text

    If I understand you correctly, YES. I sent myself an email to xxxxxxxxxx@att.txt.net from my gmail account and it came to the phone as a text message just as expected. Thank you for the help
  2. email at text

    This use to work but not anymore. Any ideas why? when I replace $to with a real email address. it works just fine! //xx.. is a 10 digit phone number. ATT says this should work! $to = xxxxxxxxxx@att.txt.net"; $subject = "My subject"; $txt = "Hello world!"; mail($to,$subject,$txt);
  3. Media Player

    Looking for a recommendation for a audio/video player that will work on mobile devices. I don't care if I pay a few bucks for it but free is good as well. I need something that will be easily modified. I will need to add some eventlistener and record the users play/stop actions etc. Thank you
  4. Prepared statement with UPDATE

    I appreciate your help. Still trying to figure out your response and how to use it on a function, or if that is even a good idea. this $stmt is going to be ran several times in a row. I figure prepared statement is the best way to go. Also, column opener_Ask is a integer. it's just a counter keeping track of how many times it was triggered. The following works but I would rather keep it the old way so I can learn more on how it works lol.Also $colName is the one that will change everytime more so than the $sesID $stmt = $conn->prepare("UPDATE tbl_calls SET $colName = $colName + 1 WHERE memberid_fk = ?");
  5. Prepared statement with UPDATE

    My very first prepared statement :-). I am sure its wrong, but not sure why . I get error "Call to a member function bind_param() on boolean". Thank you for your advice. <?php function updateCallStats($colName,$sesID){ $servername = "localhost"; $username = "root"; $password = ""; $database = "abc"; $conn = new mysqli($servername,$username,$password,$database); $stmt = $conn->prepare("UPDATE tbl_calls SET ? = ? + 1 WHERE memberid_fk = ?"); $stmt->bind_param("ssi", $colName, $colName, $sesID); $stmt->execute(); echo "Wooohoo. I did it"; } $colName = "opener_Ask"; $sesID = "10"; updateCallStats($colName, $sesID); ?>
  6. touchstart and click on refresh only

    The developer tools in Chrome is not showing that there are nay errors! Any other place I can go that may identified errors? Thank you
  7. I have a very simple code that often only works after I get to the page, then ask for the page to reload. If I click the button without reloading, nothing happens. If I click after page refresh, it works perfect. Thank you for your help. This page has a few tables all brought in by PHP select statements etc. Could that possible have some anything to do with it? <script> $(document).ready(function(){ //OPENING PRIMARY $('.OpenerPri').on ('touchstart click',function() { var ppNum = ($(this).val()); var callType = 'opener_pri'; ($(this).prop('disabled', true)); ($(this).html('Thx')); $.post("reservecall.php", { ppnum:ppNum, calltype:callType }, function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); </script>
  8. Select statement with And & Or at the same time

    Thank you sir. I have ran into a couple of prepared statements examples but I have been shy to learn them. This is a good time to just get it done. I appreciate you
  9. I am getting incorrect results with this (getting future events in the results). I am not sure if it is a date issue, or the select statement is bad. I am trying to select all the rows that have $ses_memberID in any of those columns and at the same time, only display the rows that will be on the correct date. The table structure for pp_date is the standard Date type which i believe is Y-m-d format. My next step will be to find out which column is found the search criteria in. Just in case that will effect how this step will look. Thank you so much for your help! $todaysDate=date("Y-m-d"); echo $todatsDate; // testing and the output is 2017-11-19 $sqlMC = "SELECT * FROM tbl_pp WHERE Col1 Or Col2 Or Col3 OR Col4 OrCol5 Or Col6 = '$ses_memberID' AND pp_date = '$todaysDate'"; $resultMC = mysqli_query($conn, $sqlMC); if (mysqli_num_rows($resultMC) > 0) { while($rowMC = mysqli_fetch_array($resultMC)) { //printing the rows } } else { echo "none found"; } //OUTPUT IS : I get 2017-11-19 rows printed and also 2017-11-20 showing as well!!
  10. If Statement order not working

    I am trying this. the console shows the right value, but when it gets send to accessName.php, it comes back saying it's not there. I tested accessName.php alone by setting $name="24" and I get the results I want. The 24 is the same value of the console log <script> $(document).ready(function(){ $("#btn").click(function(){ var vname = $("#uplinePri").text(); console.log(vname); if(vname=='' ) { alert("vname is empty"); } else{ console.log(vname); $.post("accessName.php", { name:vname }, function(response){ $("#uplinePri").text(response); }); } }); }); </script>
  11. If Statement order not working

    Hmmmm! You mean in the "while..." statement?. That's interesting and thank you. How would I go about overcoming that?. Will it be better if I use Ajax to get the information i need based on the $row['value1'] and $row['value2']?
  12. If Statement order not working

    I am utterly confused with this. The Section 1 works fine but section 2 says" could not find section 2 info". If I copy/paste section 2 on top of section 1, then section 2 will work and section 1 will say "could not find section 1 info" !!! Something happens after a SECTION that makes it stop recognizing the following section. Thank you for your advice. $sql3 = "SELECT * FROM tbl_imd WHERE memberid_fk = '$ses_memberID'"; $result = mysqli_query($conn, $sql3); if (mysqli_num_rows($result) > 0) { // profile already started so display content //echo "profile in the system"; while($row = mysqli_fetch_array($result)) { echo "Basic information:<hr>"; echo "Member ID: ACTIVE<BR>"; echo "Name: " . $row['full_name']. "<br>"; echo "Email: " . $row['email']. "<br>"; echo "Phone: " . $row['phone']. "<br>"; echo "IMD#: " . $row['imd_num']. "<br>"; echo "From: " . $row['city']. ", " .$row['state']. "<br>"; echo "Background: " . $row['background']. "<br>"; /**********************SECTION 1**************************/ if ($row['upline_pri']=="0"){ $upline_pri = "not selected"; echo "Primary upline: " . $upline_pri . "<br>"; } if ($row['upline_pri']!="0"){ $upline_pri = $row['upline_pri']; //echo "<br> upline pri = " . $upline_pri; $sql4 = "SELECT full_name FROM tbl_imd WHERE imd_pk = '$upline_pri'"; $result = mysqli_query($conn, $sql4); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)) { echo "Primary Upline: " . $row['full_name']. "<br>"; } } else { echo "Could not find section 1 info"; } } /****************************SECTION 2***************************/ //echo $row['upline_bak']; echo "1 <br>"; if ($row['upline_bak']=="0"){ $upline_bak = "not selected"; echo "Backup upline: " . $upline_bak . "<br>"; echo "2 <br>"; } if ($row['upline_bak']!="0"){ $upline_bak = $row['upline_bak']; //echo "<br> upline pri = " . $upline_pri; echo "3 <br>"; $sql4= "SELECT full_name FROM tbl_imd WHERE imd_pk = '$upline_bak'"; $result1 = mysqli_query($conn, $sql4); echo "4 <br>"; if (mysqli_num_rows($result1) > 0) { while($row = mysqli_fetch_array($result)) { echo "Backup upline: " . $row['full_name']. "<br>"; echo "5 <br>"; } } else { echo "Could not find section 2 info"; } } } } else { echo "ERROR: SELECT * FROM tbl_imd WHERE memberid_fk = ses_memberID "; } mysqli_close($conn); ?>
  13. Ajax results in input element

    I am new at this and playing around right now to learn JQuery. I am am thankfull for resources and advice you might give. I am sending a request to a file and I want the returned results to be entered in a disabled input box <script> $(document).ready(function(){ $("#req_btn").click(function(){ $("#myResults").load("get_results.php"); }); }); </script> Outcome: <input type="text" id="myResults" name="myResults" disabled>
  14. Update field to +1

    I am trying to make an INT field in my database to be updated from current value to current value +1. I have this so far but the value is not updating. Thank you $sql2 = "UPDATE tbl_team SET TM_Counter = TM_Counter + 1 WHERE TM_code=$access_code"; $result2=mysqli_query($sql2);
  15. ui block styling

    Exactly what I needed. Thank you very much
×