Jump to content

DanEthical

Members
  • Content Count

    97
  • Joined

  • Last visited

Community Reputation

2 Neutral

About DanEthical

  • Rank
    Regular Member
  • Birthday 02/12/1971

Profile Information

  • Gender
    Male
  • Location
    Victoria
  • Age
    50

Recent Profile Visitors

1,387 profile views
  1. LOL I know right. I will, I promise. Some day you will be proud. lol I will look into the other stuff. Thanks mate.
  2. Hi guys, Back to annoy you again. Sorry I am getting information from the Database to textbox1 (location_name), which uses an autocomplete. This works lovely. Now, what I want to do is, in textbox2 (location_phone) is have the phone number associated with the value of textbox1 to show in textbox2 automagically. Here is the HTML of both fields: <div class="row form-group"> <div class="col-6"> <div class="form-group"><label for="location" class=" form-control-label">locati
  3. <input type="text" class="searchTerm" placeholder="What are you looking for?"> <button type="submit" class="searchButton"> <i class="fa fa-search"></i> </button> You need Font Awesome. If you have it, try the above. https://fontawesome.com/icons?d=gallery&p=2
  4. Thanks mate. Still wasn't working for me. So, gave in and reverted back to good old text boxes.
  5. Cross-Origin Read Blocking (CORB), an algorithm by which dubious cross-origin resource loads may be identified and blocked by web browsers before they reach the web page..It is designed to prevent the browser from delivering certain cross-origin network responses to a web page.
  6. Hi requinix, Thanks for the reply. When I add location_id to the query I only get the id number in the dropdown. <?php $sql = "SELECT DISTINCT location_id, location_name, location_phone FROM locations"; $result = $con->query($sql); ?> <select name="location" id="location" onchange="myFunction()" class="form-control"> <?php while($r = mysqli_fetch_row($result)) { echo "<option data-location_name='$r[1]' data-location_phone='$r[2]' value='$r[0]' selected> $r[0] </option>"; } ?> Sorry mate. Struggling with this one.
  7. What errors are you getting? By saying it just doesn't work could mean anything. Any errors you get can make it easier for you to get help. Turn on error reporting if you have not done so. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
  8. Hi guys, Before we go further, yes, I know I should use prepared statements. This is just a project that will probably never go live. If I do decide to go live, I will change to prepared statements. Anyways, I am populating a text box from the selection of an options dropdown and updating MySQL. This all works fine. However, what I want to do is have the newly inserted option display by default in the dropdown. Hope this makes sense. Here is the dropdown code with the select statement... <div class="row form-group"> &l
  9. Thanks both. Sorry it took so long to respond. Been working on the road. This seems to work: // add a page $pdf->AddPage(); $html4 = '<h2>Contacts</h2> <table width="600px" border="1px">'; //data iteration $sql = "SELECT * FROM tours"; $result = $con->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { { $location=$row['location']; // concatenate a string, instead of calling $pdf->writeHTML() $html4 .= '<tr><td>'.$location.'</td></tr>'; } } } $html4 .= '</table>'; // out
  10. Hi all, I am trying to get data from MySQL to display in a html table in TCPDF but it is only displaying the ID. $accom = '<h3>Accommodation:</h3> <table cellpadding="1" cellspacing="1" border="1" style="text-align:center;"> <tr> <th><strong>Organisation</strong></th> <th><strong>Contact</strong></th> <th><strong>Phone</strong></th> </tr> <tbody> <tr>'. $id = $_GET['id']; $location = $row['location']; $sql = "SELECT * FROM tours WHERE id = $id"; $result = $con->query($
  11. Hi requinix, Is that not how it is meant to go? Sorry, it is a new learning curve for me.
  12. Hi guys, I really hope this will make sense. I am creating a dynamic field on a button click for Pickup Location. That works fine and submitting the form to the database works fine. However, instead of one entry, each time I submit the form with multiple Pickup Locations, it creates multiple separate database entries. Here is the PHP for submitting: if(isset($_POST['new']) && $_POST['new']==1){ $pickups = ''; foreach($_POST['pickups'] as $cnt => $pickups) $pickups .= ',' .$pickups; $locations = count($_POST["pickups"]); if ($locations > 0) { for ($
  13. Sorry I was joking with the Bro part. Ok, it seems that there is an issue with the JS this line: var dataResult = JSON.parse(dataResult); The Console keeps pointing to that line. Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>)
  14. Love the Bubble bust lol No that part is PHP bro. I know you know that. I did a little more research and for some reason when it is being submitted it is not checking the ID in the WHERE clause.
×
×
  • 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.