Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I know rproffitt is a moderator on the Tech Republic forums. Does anyone else participate in any other online forums / communities / subreddits / etc? Just curious :)

Phozellpay commented: Not recently, unless you count SO. +0
link88bcom commented: dd +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Is there any news yet as to what the December 2020 core update focused on? What types of sites were the biggest winners vs biggest losers?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Any big plans (while keeping safe)? Just staying home? We aren't doing much of anything.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It entirely depends what niche you're in and what type of website you're running. The techiques I would recommend for an ecommerce site are very different than those I would recommend to a news site. Can you tell a little bit about your website and what your marketing goals are? e.g. are you very conversion-focused, trying to get leads, just the most amount of traffic possible, etc.

Gaurav1578 commented: Hi Dani, My site deals with job-oriented educational courses and training. We provide technical training courses to students to get jobs in IT sector. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

In PHP, you can make use of the date function

Something like this should work, although this code is completely untested, so I'm not sure if it has any typos or is bug-free.

<?php

// Set the day of week variable to 0 (for Sunday) through 6 (for Saturday)
$day_of_week = date('w');

?>

<html>
    <head>
        <title>Calendar</title>

        <!-- CSS stylesheet -->

        <style type="text/css">
            <!--
                We say that the nth <td> element of #calendar-days should be colored red
                where n is the value of day_of_week plus 1
                So, if it's Tuesday, $day_of_week should be set to 2, so we color the 3rd <td> element red
            -->
            #calendar-days td:nth-of-type(<?= $day_of_week ?> + 1) { color: red }
        </style>
    </head>
    <body>

        <!-- First Row of Calendar Table -->

        <table>
            <tr id="calendar-days">
                <td>Sunday</td>
                <td>Monday</td>
                <td>Tuesday</td>
                <td>Wednesday</td>
                <td>Thursday</td>
                <td>Friday</td>
                <td>Saturday</td>
            </tr>
        </table>
    </body>
</html>
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You’re saying you use a combo box for the seat number. So I assume this project has some sort of front end user interface? Can you please provide the code you have so far so we can see what changes need to be made? It’s pretty much impossible to know what tweaks need to be made without seeing what you have so far.

ANGEL123@@ commented: private void OKActionPerformed(java.awt.event.ActionEvent evt) { String name = NAME.getText(); +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi,

What you’re asking for involves logic. If this, then that. If it’s this day of the week, then do that. This means your webpage doesn’t look 100% exactly the same 100% of the time.

Therefore, you need a programming language (other than HTML markup) to do what you want.

In my previous post, I suggested you use Javascript since it is used and understood by virtually every modern day web browser, and you can just stick a couple of lines of javascript code in your html to do what you want.

However, I’m now seeing that you’ve tagged this question PHP. Php is a server side language that takes some configuring of your web server in order to set up and use. Are you already using php? You can use php to accomplish what you’re looking to do as well, although, unless you’re already using php for this project, it’s a little more complicated to get started.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

An index page for a website is simply the homepage. It can have anything you want on it. What do you mean by a complaint page? Should it just say: “Welcome to my complaint site”?? If so, you can simply have:

<html>
    <head><title>Complaints</title></head>
    <body><h1>Welcome to my complaint site.</h1></body>
</html>

Save that to a file called index.html and you’re good to go. :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You need to use a programming language such as javascript. I’m on my phone right now so I can’t really toe out code, but there’s a link to a resource here: https://www.w3schools.com/jsref/jsref_getday.asp

This lets your web browser know the day of the week. You then just need to use javascript to color the text differently based on the day.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

and don't tell me what I should do -- although I am wide open to suggestions.

Sorry if it came across as insulting. I simply mean that, if you're first learning PHP or taking an introductory class in school, you might not be using a PHP templating system. However, for any actual web apps that you wish to build with PHP, you're pretty much always going to be using a PHP templating system. I've been doing PHP for 20+ years, and have not ever come across any PHP-based projects that don't use PHP templates. It simply means separating the HTML code from the PHP logic.

My reason for asking the question is you're saying you have $website = $row["website"];, but where, exactly, is that code? What do you mean by "variable loaded"? I've heard of loading a variable into a templating system, for use by your templates, if that's what you mean?

Typically you will have a PHP file that looks something like:

// ... Logic to fetch $row from the database
// blah blah blah

// Load variable into the template
load_variable('website', $row['website']);

And then you'll have your template file that looks something like:

<a href="<?= $website ?>">Click Here</a>

I'm still confused what you mean by variable loaded and where it is in relation to your HTML within the PH file. That's why I asked if you could please show your full PHP code.

Secondly, i'm not sure I understand what you mean by making a hot …

rproffitt commented: "And don't call me Shirley." - Airplane. Going to have to spin up the DVD but first "Die Hard" for XMAS! +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Well Javascript is primarily a front-end language, and it would make it hard to do that type of conversion. PHP is a back-end language, in which that kind of conversion is possible. Codemirror is a Javascript-based front-end library used to build a code editor. DaniWeb uses it for our own post editor.

Check out https://www.phpdocx.com as it's a PHP-based bundle that lets you do just what you're asking. Note it's not free, but requires a one-time licensing fee.

rproffitt commented: Neat. My bosses and clients were cheap so we used cheap/free methods in the backend. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Are your using native PHP or a PHP framework such as Laravel, Codeigniter, etc? Are you using a PHP templating system? (If not, you should be!)

Please show your full code on the page. Are you sure $row contains the MySQL query row data you are looking for as an associative array?

rproffitt commented: Igniter. Light up the grill. +0
Parker_1 commented: and don't tell me what I should do -- although I am wide open to suggestions. +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Do you have a question?

rproffitt commented: Bullseye. +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

www.domain.com/favicon.ico is showing up as a Soft 404 in my GSC Coverage report. I can't imagine blocking it with robots.txt because it seems as if bots might want to access it from time to time. Suggestions? Or should I just ignore?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

OK, so let's see ... You want to develop a webpage that enables someone to take a practice test. You want it to be done in PHP, but you don't really know PHP. You think you might need MySQL, but you don't know MySQL at all. And this is for a school assignment due Friday.

Sooo ... this might be a silly question, but is this for a course in which you are being taught PHP and MySQL? If so, are there any lessons you've learned so far that could give some instruction or direction as to what type of practice test site this should be, or what it should look like, or how it should function? Do you need to use Javascript? Is there meant to be a login system? Why do you think you need to use MySQL? Should it be a fixed number of questions, or random questions being asked?

A web app that enables people to take a practice test can be very minimal, or it can be a huge project with all the bells and whistles. How each are done is very different.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I will repeat what I asked in my first post of the thread: Can you please show the html/javascript code for the dropdowns?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

This makes absolutely no sense without any context. What pollution? What searching? What exploring?

I urge you to begin by commenting what each line is intended to do, and think about why it was written that way. That will make it easy to do a line by line conversion.

Remember, an algorithm is just a set of steps designed to accomplish a particular task or solve a problem.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hi there and welcome to DaniWeb!

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Is what you’re saying that you don’t know how to code how to change the dropdown when a radio button is clicked? Are you using javascript?

My question in my previous post was me asking if you needed help sending the $POST data. For example, are you using Javascript to trigger AJAX behavior when a radio button is selected by the end-user?

Deve381 commented: yes ajax method to load a radio buttons +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

can i usse isset($_post[id]) $fruitid = $_Post['id']

Yes, you can do something like:

if (isset($_POST['id'])) {
    // We make sure to sanitize the user input by making sure it's an integer
    //   since we will be using it in our SQL query
    $fruitid = intval($_POST['id']);
}

$getdata = mysql_query($conn, "SELECT * FROM ABC where fruitid = $fruitid");
Deve381 commented: but nothing load in dropdwon +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Here’s a random link I found on Google that should hopefully help you out: https://www.programiz.com/c-programming/c-structure-examples

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

If you unable to understand any code so please don;t blame others

I understand your code perfectly. It’s what you are asking that I am confused by.

I asked for clarification so I can help you.

Deve381 commented: can i usse isset($_post[id]) $fruitid = $_Post['id'] +0
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hey there! Welcome to DaniWeb. Two decades experience as a web developer who sells ads for a living right here :)

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I haven't looked at C++ in soooooooo many years, so I don't really remember it. However, you mentioned the second snippet you posted didn't compile, and I don't remember int mark[5][5] = {{0}}; being valid syntax.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

It should be anser = instead of double equals the way you did for the plus sign, for the other operations, when making assignments.

rproffitt commented: If the error was just on strndup(), could this incomplete code be missing the include statements too? +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Good morning!! Nice to virtually meet you.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What rproffitt is referring to is that you tagged c++, java, python, javscript, and VB6 when you created this thread. What language are you actually referring to? It might be a case of just being a new user of the site.

That being said, you can do something like this:

if (want to continue)
{
    What do you want to do now?

    switch (options)
    case 1: ...
    case 2: ...
    case 3: ...
}
else
{
    Thank you for playing!
}
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Top 10 lists of best jackets for 2021. ... or ... Holiday gift guide: buying jackets for loved ones this holiday season.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

AMP pages are clogging the Valid Pages coverage report, grouped as Indexed, Not Submitted In Sitemap.

My AMP pages are linking to the AMP version of the URLs the desktop versions link to. Desktop links to desktop. AMP links to AMP.

What this means is that sometimes the AMP version of a page gets discovered before the non-AMP version. When that happens, it gets indexed as its own page, cluttering up the coverage report. Once the non-AMP version gets crawled, the AMP version leaves the coverage report.

With millions of pages, and new pages constantly added, the coverage report is completely useless in helping me to discover any URLs that actually should be in the sitemap but aren’t, or should be noindexed but aren’t.

I guess this is more of a pet peeve than anything. Any suggestions?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Let me put it a different way ...

And do they offer added value?

The value that they bring is by bringing business to the eCommerce store. In return, the eCommerce store pays them a commission for any business they bring in.

If not, not much if any value to me.

Affiliate marketers are not meant to provide any value to you. Affiliate marketers are meant to provide value to the business that they partner with.

rproffitt commented: I think that explains this very nicely. +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Folk I know think of them as cannon fodder and while it's an industry, is it a good industry?

That's actually quite insulting. You think of all commission-based salespeople are cannon fodder? Affiliate marketing is simply the digital equivalent of a commision-based salesperson. You can think of them exactly the same. They do the exact same thing only through different mediums. A commission-based salesperson such as a broker of some type might pound the pavement, make cold calls, go door to door, try to spread word of mouth, make business connections, network, really hustle, etc. to try to drum up business. An affiliate marketer does the exact same thing only through as many digital methods as he can think of. The more creative, the more ways of reaching potential customers. The OP's question was essentially asking what different types of creative ways are there beyond the obvious. He didn't deserve to be insulted.

rproffitt commented: Having been at a few too many companies, I have to write that front line salespeople are treated like cannon fodder. +16
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I am not sure what tutorial web app you’re using, but based on the SQL you provided, it’s absolutely positively wrong that it’s showing a code column instead of local_name column.

Perhaps you didn’t hit the Run Code button and what it’s showing is leftover from the last query you wrote?

Good luck!

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I don’t have much experience with Deepfake technology, but I would just start with an avatar virtual assistant for your website.

Are you currently using virtual assistant and just want to make it more realistic?

What would you want to take advantage of in terms of deepfake tech? Would the assistant be mimicking the end-user in some way so as to make it clear it isn’t a prerecorded video of the assistant?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

I just came across this thread now but I’m on my phone while laying in bed so it’s pretty hard to read the code.

However, just from reading your question, the first thing I would check would be the error log for any PHP notices, warnings, or errors. Are you logging errors anywhere?

Also, at first glance, it looks like you aren’t escaping your variables when sending them to the browser with htmlspecialchars() or htmlentities()

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Since starting this thread, I’ve given up on using CDNs almost completely. Nearly all our third-party resources are served in-house now, although our website runs through Cloudflare as a whole.

The decision came when I read some articles a few months back about how a security change in Chrome and other web browsers will keep all assets siloed to a particular domain. That kinda makes the idea of using a CDN in case the end-user already downloaded the asset as the result of a different website they visited obsolete.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Has anyone started working with PHP 8 yet? Any big backwards compatibility issues?

I finally got around to upgrading to php 7! Lol better late than never.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

The new Crawl Stats in Google Search Console shows a breakdown of how much googlebot recrawls existing content for refreshing its index, and how much is discovery of new content.

Has anyone been working on increasing the rate of new content and seeing that correlate to a linear increase in traffic?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

What do you mean that you want to save the variables on the same page? If you’re referring to having a form where you’re enter data and then hit submit and that data shows up on the page, then yes, there’s no need for a database. But if you want persistent data where once you set it, it always stays even after you refresh/reload the page, or is seen by others, then you need a database to store those values somewhere to be retrieved later or by other people.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Some more context would be great. Why do you believe that connecting to a database would solve PHP from “stopping”? Can you please describe what you mean by stopping? Is it going too slow? Is it crashing?

Databases are typically meant to give you access to information storage, not to fix slowness issues in and of themselves. The reason to add a database to an app that doesn’t already have one is typically to add new dynamic functionality.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Update: Fast forward 6 years, and member profiles are now robots.txt'ed due to Googlebot crawl budget.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

So I see this is a homework question, but how can we help you with it? What code do you have so far? Where are your stuck? How can we help you understand how to complete this better?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

You can be logged into your Google account across many devices, from computers to phones to smart TVs to the XBox and other IoT devices. Perhaps you are accidentally signed into a device somewhere and forgot about it and someone else is using your account. Have you tried clearing out your search history, changing your password, and seeing if it’s still happening?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Sorry, I'm not understanding your question. A list of leads are potential customers, clients, etc. You want to generate a list of these potential people to reach out to who may be interested in your product or service ... from a single person? Not sure what you mean about the single person in a group part of your question. Sorry I'm misunderstanding.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

in that how and when Google responds to this is really up in the air.

True, it may take a really long time and it's not actually guaranteed (especially if Google thinks it's a typo or server misconfiguration on your end, they may ignore your directives), but I think you can be confident that if you noindex a page, and Google recrawls it since that meta directive was added, they won't index it. Googlebot also attemps to be a good citizen and they won't crawl pages in robots.txt, although they may still index these pages (especially if they have a lot of backlinks) even though they don't have access to the content on the page.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello there!

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Hello there!

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

This question has been asked time and time again. Beyond the obvious answers (lots of fresh content, no spammy techniques, etc), methods are very niche specific.

What does your website do? Eg is it Ecommerce? Informational? Etc.

rproffitt commented: Why am I thinking about Pat Sajak's recent outburst here? +15
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Also, just to confirm, none of the garbage pages are in any sitemap files, correct?

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

That doesn’t make any sense. I know I’m a horrible designer, but I have no idea what needs to happen for it to look better. That’s what makes me a poor designer in the first place.

That being said, UI/UX is all about creating a user interface that’s designed to meet your business goals.

What is the goal of someone who lands at the page? What is the primary call to action (eg what you want the user to do when they land on the page.)

Don’t give users too many choices. Feature a single form, button, link, etc that you want the end user to interact with.

Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member

Delete the garbage pages so that all of the URLs result in HTTP 404 or HTTP 410 pages. Make sure the pages are crawlable by Googlebot, and are not restricted via a robots.txt. From within Google Search Console, go to https://search.google.com/search-console/removals and submit a new request to urgently remove the content from Google Search.