Latest Web Development Posts

// recommended solution for recent PHP versions
$user_name = $_SESSION['user_name'] ?? '';

// pre-7 PHP versions
$user_name = '';
if (!empty($_SESSION['user_name'])) {
$user_name = $_SESSION['user_name'];
Or, as a quick and dirty solution:

// not the best solution, but works
// in your php setting use, it helps hiding site wide notices
error_reporting(E_ALL ^ E_NOTICE);

Full souce Code At [Icetutor](
Dani 1,842

Two years later and I'm still struggling with this.

Should you decide to outsource, I am available. I am a Senior Software Engineer with over thirty years experience. Just send me a message if you want to discuss your project.

@rproffitt gave you very sound advice on drawing up specs. Whether in house or outsourced, you need a blueprint to build from. This is known as an SRS, Software Requirements Specification. It is very important you give it the proper amount of attention. It can save you thousands of dollars in development costs.

This is what they teach you at techmedacademy? Incredible and a sure sign no one should consider them for any course or service.

Let me know the answers

Sounds correct to me as the first is string + some other string.
The second example uses a minus sign gives up a clue it's math and it does such as math.

Also the following can really test a new developer.

In JavaScript "11" + 1 is 111,
but "11" - 1 gives 10
Can anyone please help me with this ?

Let's roll back to where you wrote "all users open in different tabs, when I click on one button."

How about simple? If your site allows something like then almost all browsers all you to create a folder of URLs with ?user=donnie then ?user=marie , ?user=osmonds and so on that in a browser I can use that group and open all tabs in that group.

Dani 1,842

Yes you are right. I want to open two browser tabs off of one click. Each tabs will be opening different sessions.

This could be done with simple Javascript. Simply use""); You can trigger it when a link is clicked. Nothing to do with PHP or CodeIgniter. Also, both browser tabs will use the same CodeIgniter session.

All that being said, I agree with rproffitt in that it's a very poor user experience and therefore strongly not recommended.

rproffitt commented: A javascript approach is more likely to work. +15

I am not an expert on this but recall a few things. First, implementation, version and host OS dependent so you can not make a blanket statement except there are cycles consumed in any sleep() I've seen in decades. Now are said cycles consumed in sleep() entirely? Back to implementation, OS etc.

There are long priors here with lots of testing showing different results from different OSes including said Mint version X.YZ vs. X.YY.

And it gets very hard to measure with multiple core hosts. Sorry if this doesn't help. My thoughts here are only to share that the answer is not black and white or yes/no.

@P, isn't that fundamentally broken as by popup blockers and more?

Put another way, even if you got it to work, the user's browser settings could break it. I would not implement this just on these issues alone.

Dani 1,842

Someone posted a comment in the php usleep manual that usleep() consumes CPU cycles whereas sleep() and time_nanosleep() do not. Is this true for PHP 7.x?

hi there i'm trying to build a responsive full screen website based on prestashop 1.7 but i have an issue from long time that i have tried to solve but failed so the thing is i made the width 100%.
and margin 0, the page is full but not really full there is a small gap on right hand screen, so when i put padding-right to 5px i really get the fully screen but a second problem apears a horizontal scroll bar that is verry enoying i have screen shot of my issue can guys sugest a solution for that ? thanks.



Certainly sounds like your WordPress host needs to be asked why they are doing this.

Our website is hosted on wordpress and now we are facing an issue of files permissions its getting changed automatically by particular time duration in daily basis.
At initially file permission is (755 or 644) but after few time ago it change itself and becomes files permission to 000.
The actual issue is files could not execute over my website its showing fatal error because of permission of file is not permitted to execute it.
due to this problem i was unable read/write/update any file of my website
even tho i was unable to change it via FTP/Wordpress/Cpanel of any of this
what should i do now
please reply

I am skilled in Core PHP, JavaScript, Mysql, Ajax, HTML, CSS, jQuery and Codeigniter and having 4+ years of experience in Web Development. I have very vast knowledge in dynamic and static website development.

Hi Muhaimin, welcome to be a part of member here !

Instead hiding the Radio button DOM you are replacing those using the statement

function show(param_div_id) {
    document.getElementById('start').innerHTML = document.getElementById(param_div_id).innerHTML;

  So reference of your DOM being vanished
rproffitt commented: Try to be timely with your answers. -3

My experiences with outsourcing is it's a lot more work up front by you or your company getting the specifications down on paper which is your contract with the outsourced house or developers.

Sometimes this is dismissed as not needed by the company and the entire development feels like it was rushed, things missed and more.

In house there is some leeway as your team members get input from you much more often or they grew up with you on the effort.

So point blank the question is: How do you expect the developers or outsource company to implement what you didn't write down?

Hello Friends,
I don't whether it's the right place to ask this question or not. Apologies if it's not the right place.
I and two of my friends are working on a startup and now we are in a position to take the startup online.
Currently, the major issue that is arising is whether to go for Outsourcing or in-house software development.
We have a budget constraint but at the same time, we don't want this to affect the quality.
Honest opinion from experienced people expected.

Not quite true any more. SInce the introduction of lambdas Java has "default methods" in interfaces, which are inherited by any class that implements the interface. And yes, because you can implement multiple interfaces, this leads to exactly the same diamond problem as multiple inheritance from classes. There are new rules to determine what to do when a class inherits two methods with the same signature from different interfaces, but IMHO its a bit of a dog'e breakfast. I think it was a situation forced on the designers as a necessary cost of implementing lambdas in a totally backwards-compatible way.
It reminds me of the introduction of generics in 1.5. The implementation is a compromised mess because it had to be crowbarred into existing Java without breaking anything. Ditto Optionals. I'm sure they would love to start again with a clean sheet, or at least the option to be incompatible with some existing code, but then maybe they should just use Swift. :)

Hello DaniWebian's, This is Muhaimin Sheik, I'm a passionate web developer as back and front end. I was very friendly and helpful person. I want more know about the techie knowledge. Please guide me. Thank you all...!Cheers...!

A class can implement any number of interfaces but can extend only one class. Multiple inheritance is not supported because it leads to deadly diamond problem. However, it can be solved but it leads to complex system so multiple inheritance has been dropped by Java founders.

For ecommerce website development the most preferred platform of worlds top software development firms like GoodCore Software and others are WooCommerce and Magento.

My quiz has a textbox, mcq and checkbox.
At first, the checkAnswer() worked when I did not input the show() function to my javascript. It showed my overall score.
But after I input that show() function to display 1 question at a time, my score is always 5/7 or less.
Please do tell what is wrong with my code and if you have any recommendations. Please do tell.
Here is the demo. Click Here

        <div id="container" >   
            <div id="start"  >          
                <div id="ready">
                <button onclick="show('q1')"><h1>START NOW</h1></button>    
            <div id="quiz">         
            <form name="quizForm" >     
                <div id="q1"  style="display:none;" >
                <!--QUESTION 1-->
                     <div class="question">
                        <h1 >WHO WAS HE?</h1>   
                        <li><input type="radio" name="q1" value="wrong"/>Ted</li>       
                        <li><input type="radio" name="q1" value="correct"/>Jack</li>    
                        <li><input type="radio" name="q1" value="wrong"/>John</li>                  
                    <button onclick="show('q2')"><h1>NEXT</h1></button>
                <div id="q2" style="display:none;">
                <!--QUESTION 2-->
                <h1>TYPE HOW MANY VICTIMS</h1>  
                    <input  onkeyup=" var start = this.selectionStart;var end = this.selectionEnd;this.value = this.value.toUpperCase(); this.setSelectionRange(start, end);" id="q2" type="text" name="q2" />                  
                <button onclick="show('q3')"><h1>NEXT</h1></button>                 
                <div id="q3" style="display:none;">
                <!--QUESTION 3-->
                <h1>WHICH MOVIES WERE AN ADAPTATION?<br>pick more than 1</h1>
                    <li><input type="checkbox" name="q3" value="correct"/>Psycho (1960)</li>
                    <li><input type="checkbox" name="q3" value="wrong"/>Kickass (2010)</li>
                    <li><input type="checkbox" name="q3" value="correct"/>American Psycho (2000)</li>
                    <li><input type="checkbox" name="q3" value="correct"/>Zodiac (2007)</li>
                    <li><input type="checkbox" name="q3" value="wrong"/>Perfume: The Story of a Murderer (2006)</li>
                    <li><input type="checkbox" name="q3" value="correct"/>Halloween (1978)</li>
                    <li><input type="checkbox" name="q3" value="correct"/>The Texas Chainsaw Massacre (1974)</li>
                <button type="submit" onclick="checkAnswers()"><h1>FINISHED</h1></button>

Here is my javascript ^^;

function show(param_div_id) {
    document.getElementById('start').innerHTML = document.getElementById(param_div_id).innerHTML;

  document.getElementById("field1").addEventListener("keypress", forceKeyPressUppercase, false);
  document.getElementById("field2").addEventListener("keypress", forceKeyPressUppercase, false);

function retake() {
} ...

Please ask question and get to know answers from the Netizens about the ReactJs development. I'm also the learner of React JS and would like to seek job on that. Come join with me if you are looking for the same career.


Dani 1,842

You would need to use regular expressions the way you are doing with the other one. But I’m in bed on my phone so I can’t type it out.

Thanks for your quick reply!

I would need this to rewrite /admin/anything/ to /admin/anything.php

So anything can be put after admin and load that page, would the above do this?