Jump to content

shmideo

Members
  • Posts

    63
  • Joined

  • Last visited

shmideo's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for your reply. Well the submit part is done in a standard html way, the validation is done in php which is part of the same file. It doesn't reload the page after submit, hence you have to scroll up. to see the message.
  2. Hi Been struggling to find a way to automatically go to the top of the page after the php contact form is executed, when the success message is displayed. Probhlem I have is that the form is quite long and when it is filled in the success or failure message is not fully seen as it displays at the top. Thanks Code below: <div class="row"> <div class="col-md-6"> <div class="offset-anchor" id="contact-sent"></div> <?php if (isset($arrResult)) { if($arrResult['response'] == 'success') { ?> <div class="alert alert-success" id="contactSuccess"> <strong>Success!</strong> Your message has been sent to us. </div> <?php } else if($arrResult['response'] == 'error') { ?> <div class="alert alert-danger" id="contactError"> <strong>Error!</strong> There was an error sending your message. (<?php echo $arrResult['error'];?>) </div> <?php } else if($arrResult['response'] == 'captchaError') { ?> <div class="alert alert-danger" id="contactError"> <strong>Error!</strong> Verificantion failed. </div> <?php } } ?>
  3. The queries merge ok and results are correct except I get a notice: "Notice: Use of undefined constant UNION - assumed 'UNION' in...." But is UNION a constant or is the context wrong? $query = $query1." ".UNION." ".$query2; $result = mysqli_query($dbcon, $query) or die('Error getting data'); $num_rows = mysqli_num_rows($result);
  4. Yes exactly, however I have no control of the table layout but I'll give this a try. Thanks for your help.
  5. Thanks Barand, This works, but due to the clid format, which for example: "Client-1-+012345678" <012345678>" . There may be several instances of the same number. It groups by clid and it does exactly as it's supposed to, but I'm trying to get a count for all rows per client, so is there a way to group by clid except say maybe only by the client name, ie, ignore everything after the '-+'?
  6. Hi Could do with some help. I have 20 clients (client-1, client-2, client-3) and so on. Each client makes several calls per day. How can I get a row count from two columns (Date, clid) and echo the count for each client?
  7. Hi, I'm using $clid = mysqli_real_escape_string ($dbcon, $_POST['clid']); but have come across an issue with certain characters, for example: "bekæ" actually searches for "bekæ", hence no records. The records cannot be changed in the table, so is there a way to fix this?
  8. No for some reason if that condition is present then no results are found for ones that don't require it. Can you give an example of a dynamic field to output please?
  9. Hi I have a form that has a drop-down with a few to choose from, unfortunately I don't get results for some due to the query involved. Some need the AND channel LIKE '%$channel%'"; and some don't and therefore will not get desired results. So I would like to run two queries one with and one without. $query = "SELECT * FROM asterisk_cdr WHERE calldate BETWEEN '$calldate' AND '$calldate2' AND clid LIKE '%$clid%' AND channel LIKE '%$channel%'"; Thanks
  10. I managed to get it working. echo substr($row['columnname'], 6, 3); This just displays those 3 digits. Local/ is always there, the rest changes, so just wanted the 3 digits to show. Sorry for the confusion
  11. Thanks Barand, I should have mentioned that the 3 digits will always change but after that it will also change. Sorry I should have been clearer.
  12. Hi Using: echo $row['columnname']; How can I strip off data from the above echo? The column always begins with 'Local/' then 3 digits then other unwanted data, lke 'Local/567@context-0000461d;1'. It would be ideal to just display '567'.
×
×
  • 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.