how to set background image in php?

how to set background image in php? – CSS background-image property setting the background image and other CSS.

how to set background image in php

Here’s an example using background images for both the form and its wrapper: Very simple just there two types to add background images to forms in PHP

Also Read This 👉   Elementor custom taxonomy select

with inline css & with internal css using class properties.

background images to forms in PHP


$wall_paper = "a.jpg";

<style type="text/css">

body {
background-image: url('<?php echo $wall_paper;?>');

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome To</title>

how to add background image in php code

adding background image css
how to set background image in php?

body {
 background-image: url("dp-banner.gif");
 background-color: #cccccc;

Set multiple background images for the body element:

body {
  background-image: url("banner.gif"), url("logo.gif");
  background-color: #cccccc;

CSS Code
Add the Background image using background attribute

.form-wrapper { 
  background-image:  url("logo.jpg"); 
  background-size: cover; 
  background-repeat: no-repeat; 
  background-attachment: fixed; 

Don’t Miss : PHP Automatically Stretch Background Fit Image

Also Read This 👉   jQuery Get the Text Value of Selected Option

How to add Background Image in Html?

<Body background=" ">   
<Body background="filename.extension">  
<Body background="logo.jpg"> <br>  
<Body background="/home/sumit/Desktop/images/logo.jpg">   
<Body background="">   

I hope you get an idea about how to set background image in php?.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.