Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Could you please give me an example of a good service that provides the API? I've used https://www.sender.net to send bulk emails before. But this is using an email list. And it doesn't seem like they have an API.
  3. Today
  4. Sorry, but I still don't think I am understanding you... My user starts off on this page... www.mysite.com/store/product-gallery.php (Technically, I could chop off the ".php" to make it totally "pretty", but I'm not so concerned about that.) A gallery of thumbnails appears. The user clicks on one of those thumbnails - which represents a product - to learn more about the product. Here is where I'm not sure if we are following each other... I don't care about the format of the URL behind that thumbnail that the user clicked, HOWEVER, when the product details page laods for sku 4571, I want the user to see the following URL... www.mysite.com/store/products/4571 Clear? It's a one-way street in that you can't have an "ugly" URL and then load a page displaying a "pretty" URL. If you want a "pretty" URL to appear when the page loads, you need to have a "pretty" URL in the hyperlink behind the image. Right? So I'm not following you when you say I am taking an extra unnecessary step.... If I am wrong about something or am misunderstanding you, please correct me. But it seems like your suggestion wouldn't work like I need it to work. 🙂
  5. Yes - you have the right idea. I was only pointing out that if you built your page with the complete link embedded in it you wouldn't need the extra step in the middle. For me - being pretty is not important since the user is only going to see it for about 2 seconds on screen depending upon his/her connection speed. After that the page that is returned will have its own url.
  6. Didn't need to. My point is that there *IS* value in "pretty URLs" although a lot of techies disagree. Back back on track.... So does it sound like I am approaching things the correct way in my OP - besides differeing opinions on what URLs should look like?
  7. You didn't show ANYTHING like that in your previous example.
  8. Most people would not find this URL to be intuitive... www.mystore.com/store/products.php?category=clothing&gender=mens&type=outerwear&season=winter-coats This, by contrast is more intuitive... www.mystore.com/store/products/clothing/mens/outerwear/winter-coats/
  9. IMHO - showing the exact url that you are really using right up front is more intuitive rather than going thru a re-format of it for no real reason.
  10. I prefer pretty URLs and the hope is - for people who still look at the Address Bar - that it will be more intuitive to them.
  11. Hi cyberRoot, Thanks for the response. I have checked this already. As you can see, in the example that you refer to, the audio file is loaded directly from a file and the eventListener works in that case. In the other case the data is returned as a part of the get response. The binary blob is received and can be seen in the console. The eventListener does not get triggered this way. Further the two blobs received in the two different ways are also slightly different. Just for the sake of checking / digging further, If I save the audio object created usinf xsendfile in a file as an mp3. It does not play and gives an error. Hoping someone can help resolve this. Thanks !.
  12. I haven't used Audio() myself, however, the documentation found at the following link contains an example with an event listener for "loadeddata": https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement
  13. I'm asking why you don't simply produce the same url from the LINK instead of passing a shortened version to your script that then produces that same url.
  14. Hi all ! In am trying to modify the following snippet html <audio src = "playsound1.php?test=1.mp3" /> php (simplified) <?php . . . header('X-Sendfile: 1.mp3'); header('Content-Type: audio/mpeg'); ?> so that I don't have to use the <audio .. /> tag. I want to use the jQuery get to retrieve the sound instead. Here's what I have tried doing. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <h2>My Sounds</h2> <span class='btn'>Play</span> <script> $(document).ready(function(){ $('.btn').click( function(){ $.get( "playsound1.php", {sf: "ready.mp3"}, function( data ) { var audio = new Audio(data); audio.type = "audio/mpeg"; // console.log(audio); audio.play(); }); }); }); </script> But it ends up with an error. I think I need to use some kind of an event to check that the data is loaded before audio.play() is called but i am not sure how to do that. Looking for some advise to achieve this. Thanks all !
  15. Sorry, I have another function page <?php //************************************** // Page load dropdown results // //************************************** function getTierBLOne() { include 'includes/conn_db.php'; $result_query = mysqli_query($conn,"SELECT * FROM nova_tp_forex_main_cats ORDER BY forex_name ASC"); while ($tier = mysqli_fetch_array($result_query)) { echo '<option value="'.$tier['forex_id'].'">'.$tier['forex_name'].'</option>'; } } //************************************** // First selection results // //************************************** if (isset($_GET['func'])&& $_GET['func'] == 'drop_bl' ) { drop_1($_GET['drop_var']); } function drop_1($drop_var) { include_once('includes/conn_db.php'); $result_query = mysqli_query($conn,"SELECT * FROM nova_tp_forex_main_cats WHERE forex_main_cat = '$drop_var' ORDER BY forex_subcat_name"); echo '<select name="drop_2" id="drop_2"> <option value=" " disabled="disabled" selected="selected">Choose one</option>'; while($drop_2 = mysqli_fetch_array($result_query)) { echo '<option value="'.$drop_2['forex_subcat_id'].'">'.$drop_2['forex_subcat_name'].'</option>'; } echo '</select> '; } ?> So what effectively happens (or suppose to happen) is the plugin page goes to this page to pull initial drop down data, then on change the ajax calls the next function to populate the second drop down
  16. Hi All I am trying to write chained selects for a WordPress plugin I am busy with. I have been struggling with it for a few days because my ajax is very weak. This is my file plugin file: <?php function js_enqueue_scripts() { wp_enqueue_script ("nova-ajax-handle", get_stylesheet_directory_uri() . "js/nova-ajax.js", array('jquery')); //the_ajax_script will use to print admin-ajaxurl in custom ajax.js wp_localize_script('nova-ajax-handle', 'nova_ajax_script', array('ajaxurl' =>admin_url('admin-ajax.php'))); } add_action("wp_enqueue_scripts", "js_enqueue_scripts"); ?> <select name="drop_bl" id="drop_bl" style="margin-top:0px;margin-left:35px"> <option value="" selected="selected" disabled="disabled">Select a Province</option> <?php getTierBLOne(); ?> </select> <span id="wait_bl" style="display: none;"> </span> <span id="result_bl" style="display: none;"></span> My Javascript file looks like this: $(document).ready(function() { $('#wait_bl').hide(); $('#drop_bl').change(function(){ $('#wait_bl').show(); $('#result_bl').hide(); $.ajax({ url: nova_ajax_script,ajax_url, type: get, func: "drop_bl", drop_var: $('#drop_bl').val() }), function(response) { $('#result_bl').fadeOut(); setTimeout("finishAjax('result_bl', '"+escape(response)+"')", 400); } return false; }); }); function finishAjax(id, response) { $('#wait_bl').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } When I select my first dropdown, it does not fire up the second one. This is my very first attempt at WordPress development, so I might be making many errors Thank you
  17. The best way is to not do it yourself: sending 100k emails per day from a generic hosting company is a reliable way to get your server blacklisted and emails blocked. There are plenty of services that provide APIs.
  18. Say I am using a normal web hosting company like Namecheap. I have a cron job set to send emails to 100,000 users each day, what would be the best way to deliver those emails the fastest? I know there are other platforms that allows you to send mass emails. But those you have to manually input the email list. I want it automated running from the cron job.
  19. Not sure that I follow you... I have Step 3 because you start off in a gallery of thumbnails with no product details and after you choose a given thumbnail, then you go to a product details page which has all of the item's details.
  20. I dont' see why you have step 3. You're open about the name of your starting gallery script in the url. But why not with the url that your link is sending? Why have to reformat it as step 4?
  21. Sounds pretty reasonable to me. If you want, you can add JS hoover preview.
  22. Hello. I just created a product gallery containing thumbnails of items that I will be selling. When a user click on on of the thumbnails, I want a product details page to appear with more details about the chosen product Could use some feedback if I am going about things the right way... Step 1: User goes to my gallery located here: www.mysite.com/store/product-gallery.php Step 2: System displays a page of thumbnails representing items that I am selling. Step 3: User click on a given thumbnail which is a hyperlink to: www.mysite.com/store/products/4571 Step 4: System rewrites the URL as such: www.mysite.com/store/products.php?sku=4571 Step 5: System queries MySQL and retrieves record for sku 4571 Step 6: System displays product details for the chosen item in Step 3 which is sku 4571 How does that sound?
  23. Yesterday
  24. Did you write the script? If not, you might want to look into an alternative solution. For example, user-supplied information like what comes from $_POST['username'] should not be placed directly into the query. You will want to use prepared statements to prevent someone from performing SQL Injection attacks. You should also look into a solution that uses password_hash() for hashing passwords. More information about hashing passwords can be found here: https://www.php.net/manual/en/faq.passwords.php
  25. Hello- I am not generating any errors with this php snippet which is in my functions.php file of the child theme for wordpress but I'm wondering why it doesn't work. Snippet: function pnavi_shortcode() { return get_the_post_navigation(); }add_shortcode ( 'pnavi', 'pnavi_shortcode' ); I have also tried using a variable = to the function of get_the_post_navigation() but same issue. This script is supposed to show the previous - next navigation for pages of posts, not the 'next' single post. Via a theme, it is working, but I'm trying to add something myself in another location. Any suggestions?
  26. Last week
  27. Is there a problem here? What's keeping you from a) formatting your script so it is readable and b) from doing it?
  28. ----------------------------------------------------------this code---------------------------------------------------------------------- <?php if($login_incorrect){ if(isset($_COOKIE['login'])){ if($_COOKIE['login'] < 3){ $attempts = $_COOKIE['login'] + 1; setcookie('login', $attempts, time()+60*10); //set the cookie for 10 minutes with the number of attempts stored } else{ echo 'You are banned for 10 minutes. Try again later'; } } else{ setcookie('login', 1, time()+60*10); //set the cookie for 10 minutes with the initial value of 1 } } ?> ----------------------------------------------------in here---------------------------------------------------------------------------------- include('dbc.php'); if(isset($_POST['login'])) { $username=$_POST['username']; $password=$_POST['password']; if(empty($username) && empty($password)) { echo"<script>alert('please enter username and password')</script>"; } if(empty($username) || empty($password)) { echo"<script>alert('please enter username and password')</script>"; } $pass= hash('sha512', $password); $set="Lecturer"; $set2='Admin'; $sel="select * from $tb1 where username='$username' and password='$pass'"; $result=mysqli_query($con,$sel); $row=mysqli_fetch_array($result); if($row['username']== $username && $row['password']== $pass && $row['usertype']==$set) { $_SESSION["username"] = $_POST["username"]; $_SESSION['last_login_timestamp'] = time(); $_SESSION['username'] = $username; header('location:userhome.php'); } elseif ($row['username']== $username && $row['password']== $pass && $row['usertype']==$set2) { $_SESSION["username"] = $_POST["username"]; $_SESSION['last_login_timestamp'] = time(); $_SESSION['username'] = $username; header('location:adminhome.php'); }} else {echo"<script>alert('not registered/approved')</script>";} ?>
  1. Load more activity
  • Member Statistics

    • Total Members
      185,591
    • Most Online
      1,581

    Newest Member
    narsimha
    Joined
  • Forum Statistics

    • Total Topics
      300,767
    • Total Posts
      1,556,992
×
×
  • 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.