PHP - Imagefilledrectagle - Pattered Background ?
imagefilledrectagle - pattered background ?
Hi All Is it possible to have a pattern as the background of image created with imagefilledrectangle. This creates a solid tray block but I want a block with a simple pattered fill. Code: [Select] <?php header('Content-Type: image/png'); $im = imagecreatetruecolor(1020, 215); $gray = imagecolorallocate($im, 220, 220, 220); imagefilledrectangle($im, 0, 0, 1020, 214, $gray); imagepng($im); imagedestroy($im); ?> Similar TutorialsHey i got one problem i want add background how i should make it any help will be welcome Code: [Select] <?php //source file $file = "test.txt"; //images size $high = "200"; $wide = "400"; //generate image $data = file($file); $im = @ imagecreate($wide, $high) or die("Error"); $bc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); $lines = (int) $high / 10; for ($t = 0; $t < $lines; $t++) { imagestring($im, 3, 4, 4, $data[$t], $tc); imagestring($im, 3, 4, 4 + ($t * 10), $data[$t], $tc); } //header("Content-type: image/png"); //imagepng($im); imagepng($im,"pildid/1.png"); imagedestroy($im); ?> I envision running code in the background without slowing my own PHP page render. This code accesses optional "Additional Information" via a 3rd party server API ("www.example.com/Additional_Information.php?SKU=1234567"). Unfortunately, it takes a full 10 seconds to retrieve the data from the 3rd party server, and, not all visitors will need this "Additional Information." My own server is fast -- it retrieves mySQL data from my server and renders the result to the Visitor in less than 4 milliseconds. Because it takes an average Visitor about 10 seconds to actually READ my entire page (description, photos, etc.), this would be a perfect time to run a script in the background so that if the Visitor chooses to click the "Additional Information" link, the data will already be available (because the background script would run in the background and post its results to my own mySQL server while the Visitor was busy reading). I've been studying asynchronous cURL calls, opening sockets, forking cURL, and even using cURL to call another cURL script on my server. These seem to slow down my PHP page render. Because not all visitors will want this "Additional Information," I don't want to slow my webpage down for everyone. Is there a way to have code 'truly run in the background' and post its result to my super-fast mySQL server, so if a Visitor does click on the "Additional Information" link, they'd get instant results from my own server? Edited December 2, 2018 by StevenOliverOriginal question revolved around cURL. I'm trying to "step out of the box" with the awareness there are other methods than cURL. Hello all, im fairly new, but i have a question that i cant answer. is it possible to use the contents of a folder as a website background as in my pictures folder would be a tile of the same size images as my website background? and if i upload some more photos it automatically updates the background? and it would get gradually smaller as the more pictures came into the folder like 2 pics would be side by side 4 would be one in each corner and 6 and 8 and so forth so basically it sizes them equally so that it fills the page. any ideas ? cheers Hey guys, I've hit a huge obstacle in my coding process of a script I am writing. It is basically an uploading interface script and it works like this. I have files on my server and I want a user to click a button which fires a php script which in turn fires a bash script which IN TURN fires the uploading program (plowshare). So to make it simple: user logs in, sees upload button. Clicks it, file starts uploading. I then want the user to see "upload initiated" and that's it. The problem is that with what I have now, the script just won't finish loading until the file has been uploaded and as a matter of fact I don't even think it is uploading anything :S Here are the scripts: PHP interface to call the bash script: Code: [Select] <?php error_reporting(E_ALL); function run_in_background($Command, $Priority = 0) { if ($Priority) $PID = shell_exec("nohup nice -n $Priority $Command 2> /dev/null & echo $!"); else $PID = shell_exec("nohup $Command 2> /dev/null & echo $!"); return($PID); } function is_process_running($PID) { exec("ps $PID", $ProcessState); return(count($ProcessState) >= 2); } $file = $_GET['file']; // Location of file relative to the index $where = $_GET['where']; // Absolute index location $absolute = '/var/www/vhosts/animekyun.com/httpdocs/icarus/'; $where = $absolute . $where; //$outfile ='log'; echo $where . $file . '<br>'; echo "<h2>The upload has been initiated!</h2>"; $ps = run_in_background("/bin/sh uploadparser.sh $file $where > $outfile"); while(is_process_running($ps)) //echo $output; ?> Bash script to call uploading program: Code: [Select] #!/bin/sh { FILE=$1 WHERE=$2 FILENAME="/var/www/vhosts/animekyun.com/httpdocs/icarus/debug/debug_mu_$FILE" FILENAME2="/var/www/vhosts/animekyun.com/httpdocs/icarus/debug/debug_multi_$FILE" /usr/local/bin/plowup megaupload "$WHERE$FILE" >> "$FILENAME".txt 2>&1 /usr/local/bin/plowup multiupload "$WHERE$FILE" >> "$FILENAME2".txt 2>&1 } & this works fine when I pass the variables as arguments in CLI I hope i have been clear enough, it does seem rather confusing I have an action that will take a long time to finish, so how can I run this action in background? So I will not have to wait it ends... I have a page that displays various articles. I would like to show a background image for each article. Let's say I have articles for beaches. I would like to have a beach photo. Airplane article, show airplanes, etc. How can I accomplish this. helllo when people visit my site the background of my site isnt there, but then the log in, it appears, so it only works when thye are logged in, can someone please look over y code and see why this is happening, i have been stuck on this for 1 week now Code: [Select] <?php // Start_session, check if user is logged in or not, and connect to the database all in one included file include_once("scripts/checkuserlog.php"); // Include the class files for auto making links out of full URLs and for Time Ago date formatting include_once("wi_class_files/autoMakeLinks.php"); include_once ("wi_class_files/agoTimeFormat.php"); // Create the two objects before we can use them below in this script $activeLinkObject = new autoActiveLink; $myObject = new convertToAgo; ?> <?php // Include this script for random member display on home page include_once "scripts/homePage_randomMembers.php"; ?> <?php $sql_blabs = mysql_query("SELECT id, mem_id, send_id, the_blab, blab_date FROM blabbing ORDER BY blab_date DESC LIMIT 30"); $blabberDisplayList = ""; // Initialize the variable here while($row = mysql_fetch_array($sql_blabs)){ $blabid = $row["id"]; $uid = $row['send_id'] != 0 ? $row['send_id'] : $row['mem_id'] ; $the_blab = $row["the_blab"]; $notokinarray = array("fag", "gay", "shit", "fuck", "stupid", "idiot", "asshole", "cunt", "douche"); $okinarray = array("gaybo", "homosexual", "poo", "bugger", "dumb", "jerk", "sphincter", "vagina", "douche"); $the_blab = str_replace($notokinarray, $okinarray, $the_blab); $the_blab = ($activeLinkObject -> makeActiveLink($the_blab)); $blab_date = $row["blab_date"]; $convertedTime = ($myObject -> convert_datetime($blab_date)); $whenBlab = ($myObject -> makeAgo($convertedTime)); //$blab_date = strftime("%b %d, %Y %I:%M:%S %p", strtotime($blab_date)); // Inner sql query $sql_mem_data = mysql_query("SELECT id, username, firstname, lastname FROM myMembers WHERE id='$uid' LIMIT 1"); while($row = mysql_fetch_array($sql_mem_data)){ $uid = $row["id"]; $username = $row["username"]; $firstname = $row["firstname"]; if ($firstname != "") {$username = $firstname; } // (I added usernames late in my system, this line is not needed for you) /////// Mechanism to Display Pic. See if they have uploaded a pic or not ////////////////////////// $ucheck_pic = "members/$uid/image01.jpg"; $udefault_pic = "members/0/image01.jpg"; if (file_exists($ucheck_pic)) { $blabber_pic = '<div style="overflow:hidden; width:40px; height:40px;"><img src="' . $ucheck_pic . '" width="40px" border="0" /></div>'; // forces picture to be 100px wide and no more } else { $blabber_pic = "<img src=\"$udefault_pic\" width=\"40px\" height=\"40px\" border=\"0\" />"; // forces default picture to be 100px wide and no more } $blabberDisplayList .= ' <table width="100%" align="center" cellpadding="4" bgcolor="#CCCCCC"> <tr> <td width="7%" bgcolor="#FFFFFF" valign="top"><a href="profile.php?id=' . $uid . '">' . $blabber_pic . '</a> </td> <td width="93%" bgcolor="#EFEFEF" style="line-height:1.5em;" valign="top"><span class="greenColor textsize10">' . $whenBlab . ' <a href="profile.php?id=' . $uid . '">' . $username . '</a> said: </span><br /> ' . $the_blab . '</td> </tr> </table>'; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="Description" content="Cookbookers is a community website for people to create and share recipies, make friends or join up with old friends" /> <meta name="Keywords" content="cookbookers, cook, cookbook, cooks, chefs, chef, cookery, book, books, cooking, community, share, communicate,recipies, free, friends, register, shareing, " /> <meta name="author" content="lachlan mcgrath"/> <meta name="ROBOTS" content="INDEX,FOLLOW"/> <meta name="google-site-verification" content="fbI5fgCcTZh3cTw3deqVLevmvZkSOj3C-EwMDS7XMPI" /> <title>CookBookers - Your online cooking community</title> <link href="style/main.css" rel="stylesheet" type="text/css" /> <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <script src="js/jquery-1.4.2.js" type="text/javascript"></script> <style type="text/css"> .style1 { font-family: Arial; font-size: 18px; } #Layer1 { height:210px; background-image: url(images/top_container_bg_recipes_new.gif); } body { margin-bottom: 0px; background-image: url(images/bg.jpg); background-repeat: repeat-x; background-color: #360904; } .boxHeader { border:#999 1px solid; background-color: #FFF; background-image:url(style/accountStrip1.jpg); background-repeat:repeat-x; padding:5px; margin-left:19px; margin-right:20px; margin-top:6px; color:#060; text-decoration:none; } .style3 {font-size: 20px} #apDiv1 { left:294px; top:308px; width:848px; height:59px; z-index:1; } #apDiv2 { left:283px; top:159px; width:288px; height:126px; z-index:2; } #filter td { filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5; } </style> <script language="javascript" type="text/javascript"> function toggleSlideBox(x) { if ($('#'+x).is(":hidden")) { $(".editBox").slideUp(200); $('#'+x).slideDown(300); } else { $('#'+x).slideUp(300); } } </script> </head> <body> <p> <?php include_once "header_template.php"; ?> </p> <center> <table cellpadding="0px" cellspacing="0px" style="border:0px solid #666666;" width="75%"> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <table cellspacing="0px" border="0" align="center" width="54%" height="25%" style="background-color:transparent"> <tr> <td><a href="http://www.facebook.com/pages/Cookbookers/140615036007324"><img src="images/facebook_button.png" width="87" height="87" align="absmiddle" /></a> <a href="http://twitter.com/cookbookers"><img src="images/Twitter_button.png" width="87" height="87" align="absmiddle"/></a></td> <tr> <td><img src="images/banner_catering.jpg" width="835" height="262" /></td> </tr> </table> <tr></tr> <tr> <td><table width="59%" height="22" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color:#F2F2F2; border:0px solid #666666;"> <tr> <td valign="top" colspan="2" style="background-color:#F2F2F2; border:0px; padding:10px;"> <table border="0" cellpadding="6"> <tr> <td class="style1">Newest Members:</td> <td> <?php print "$MemberDisplayList"; ?> </td> </tr> </table> </td> </tr> <tr> <td width="358" valign="top" style="width:250px; overflow:auto;"> <table width="358" height="152" align="center" cellpadding="4" bgcolor="#F2F2F2" style="border: 0px;"> <tr><td width="344" colspan="2">Recent Posts</td></tr> <tr> <td bgcolor="#F2F2F2" valign="top"><?php print "$blabberDisplayList"; ?></td> </tr> </table> </span> </td> <td width="557" valign="top"> <p>Hello and welcome to cookbookers.com! We are an online cooking community where you can share recipes and communicate with others that love to cook. In your account you can add recipes to share with the public or you can just keep them for yourself inside you own personal cookbook. There'll be more work happening to the website during the next couple of weeks, we're gonna be enhancing the website a bit more, adding garnishes, making it a bit more appealing for everyone. We'll be adding a few new features shortly as well: a forum, you'll be able to comment on recipes and have yours commented, a live chat. But that's just a few of them.</p> <p>If you have any suggestions for the site or any questions; feel free to contact me thought the website, send me a private message or just blab on my page. My name is Lachlan Mcgrath.</p> <p>So please join up, add recipes and make new friends on cookbookers.com today!</p> <p> </p> <p>Happy Sharing!</br> </p> <p>Lachlan McGrath</br> </p> <p>Owner/creator. </p> <p> <?php if(isset($_SESSION['username'])) { } else { include('login.php'); } ?> </p> <p> </p></td> </tr> </table> <p> <?php include_once "footer_template.php"; ?> </p> <p><!-- Histats.com START (standard)--> <script type="text/javascript">document.write(unescape("%3Cscript src=%27http://s10.histats.com/js15.js%27 type=%27text/javascript%27%3E%3C/script%3E"));</script> <a href="http://www.histats.com" target="_blank" title="free stats" ><script type="text/javascript" > try {Histats.start(1,1395398,4,198,85,17,"00001000"); Histats.track_hits();} catch(err){}; </script></a> <noscript><a href="http://www.histats.com" target="_blank"><img src="http://sstatic1.histats.com/0.gif?1395398&101" alt="free stats" border="0"></a></noscript> <!-- Histats.com END --></p> </body> </html> thanks! Hello, I'm using this PHP code to generate a random number and display into PHP number, How could I add my own custom background for it with custom size: <?php // Set the content-type header('Content-Type: image/png'); srand ((double) microtime( )*1000000); $random_number = rand(0,1000000); // Create the image $im = imagecreatetruecolor(90, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); $red = imagecolorallocate($im, 255, 0, 0); $blue = imagecolorallocate($im, 255, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = $random_number; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text // Add the text imagettftext($im, 20, 0, 10, 20, $blue, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Would something like: $im = imagecreatefromgif ( "bg.gif" ); Work, I've tried that, nothing displays. Many thanks. GD Library Pattern Background ? Hi all I have a simple page here that uses the GD Library to display text in a selected font and size etc. http://www.ttmt.org.uk/forum/ At moment the stripped background goes from the code. Is there a way to have an image as the background instead of the stripped background. PHP code Code: [Select] <?php header('Content-Type: image/png'); $im = imagecreatetruecolor(900, 215); $w = imagecolorallocate($im, 255, 255, 255); $c = imagecolorallocate($im, 220, 220, 220); $black = imagecolorallocatealpha($im, 0, 0, 0, 20); $style = array($w,$w,$w,$c,$c,$c); ImageSetStyle($im, $style); ImageLine($image, 100, 0, 50, 50, IMG_COLOR_STYLED); imagefilledrectangle($im, 0, 0, 900, 214, IMG_COLOR_STYLED); $text = $_GET['text']; $textSize = $_GET['size']; $font = $_GET['font']; imagefttext($im, $textSize, 0, 15, 165, $black, $font, $text); imagepng($im); imagedestroy($im); ?> Hi, I have This Function For Two backgrounds row of table : Code: [Select] function background() { $bg = ''; // odd $bg2 = 'F3F3F3'; // even if ( $i%2 == 0 ) $bgs = "$bg"; else $bgs = "$bg2"; return $bgs; } PHP CODE IS : Code: [Select] echo "<TABLE>"; $i = 0; while ($f = $db->fetcharray( $r )) // for fetch { background(); // function echo "<tr> <td bgcolor=\"{$bgs}\">$id</td> <td bgcolor=\"{$bgs}\">$name</td> <td bgcolor=\"{$bgs}\">$date</td> </tr> "; $i++; } echo "</table>"; But This Not Worked. What's Problem ? Thanks session_start(); $text = rand(10000,99999); $_SESSION["vercode"] = $text; $height = 25; $width = 65; $image_p = imagecreate($width, $height); $black = imagecolorallocate($image_p, 255, 255, 255); $white = imagecolorallocate($image_p, 0, 0, 0); $font_size = 14; imagestring($image_p, $font_size, 5, 5, $text, $white); imagejpeg($image_p, null, 80);The code above creates an image with white background. How to change it to create transparent background? I want to change the background to a light gray if the value of the $UOMPDROPSEQUENCE field is an odd number.
What would be the best way to do this please keep in mind I am very new to programming and PHP Thanks
Below is a snippet of my code.
$result =odbc_exec($connect,$sql); if(!$result){ exit("Error in SQL"); } echo "<table><tr>"; echo "<th>Drop</th>"; echo "<th>Name</th>"; echo "<th>Note</th>"; echo "<th>PO</th>"; echo "<th>Box_count</th>"; echo "<th>Cubes</th>"; echo "<th>ADDRESSLINE</th>"; echo "<th>ADDRESS2</th>"; echo "<th>CITY</th>"; echo "<th>STATE</th>"; echo "<th>ZIP</th>"; echo "<th>Order_ID</th>"; echo "<th> Phone </th>"; while (odbc_fetch_row($result)) { $UOMPDROPSEQUENCE=odbc_result($result,"UOMPDROPSEQUENCE"); $cmlName=odbc_result($result,"cmlName"); $UCMLSTOREHOURSTXT=odbc_result($result,"UCMLSTOREHOURSTXT"); $ompCustomerPO=odbc_result($result,"ompCustomerPO"); $UOMPTOTALBOXCOUNT=odbc_result($result,"UOMPTOTALBOXCOUNT"); $UOMPVOLUMETOTAL=odbc_result($result,"UOMPVOLUMETOTAL"); $CMLADDRESSLINE1=odbc_result($result,"CMLADDRESSLINE1"); $CMLADDRESSLINE2=odbc_result($result,"CMLADDRESSLINE2"); $CMLCITY=odbc_result($result,"CMLCITY"); $CMLSTATE=odbc_result($result,"CMLSTATE"); $CMLPOSTCODE=odbc_result($result,"CMLPOSTCODE"); $ompSalesOrderID=odbc_result($result,"ompSalesOrderID"); $cmlPhoneNumber=odbc_result($result,"cmlPhoneNumber"); echo "<tr><td>$UOMPDROPSEQUENCE </td>"; echo "<td align='center'>$cmlPhoneNumber</td>"; echo "<td align='center'>$UCMLSTOREHOURSTXT</td>"; echo "<td align='center'>$ompCustomerPO</td>"; echo "<td align='center'>$UOMPTOTALBOXCOUNT</td>"; echo "<td align='center'>$UOMPVOLUMETOTAL</td>"; echo "<td align='center'>$CMLADDRESSLINE1</td>"; echo "<td align='center'>$CMLADDRESSLINE2</td>"; echo "<td align='center'>$CMLCITY</td>"; echo "<td align='center'>$CMLSTATE</td>"; echo "<td align='center'>$CMLPOSTCODE</td>"; echo "<td align='center'>$ompSalesOrderID</td>"; echo "<td align='center'> $cmlPhoneNumber</td></tr>"; } odbc_close($connect); Good Day guys
I need some help with something that I am busy with. I have a wallpaper that need to get weather effects on it but it has to be according to the current weather status and time. The wallpaper is in the attached. I have searched the net the whole day now and cant find what I am looking for.
Let me give an example:
If it rains the background wallpaper must have the rainy look and be wet, when its sunny there need to be a sun and the background must be brighter.
Please help me with this.
Attached Files
bg.jpg 127.22KB
0 downloads Hi all,
Any idea what Pinterest uses to make the background move please?
I searched everywhere and cannot find the answer:
https://www.pinterest.com/
I need the same type of background movement + popup on my site, it looks so nice!
Thank you,
Ben
So I'm new to PHP GD, I cant understand why the PNG image will not go transparent, it's just showing a white background.
Could anyone help me out with this?
Spoiler This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319094.0 This creates an image 1500x1500 pixels. But it creates it in black... how can i make it white. And i have to use imagecreatetruecolor() not imagecreate(). <?php $im = imagecreatetruecolor(1500,1500); // Output the image to the browser header('Content-type: image/jpg'); imagejpeg($im); imagedestroy($im); ?> Thanks! I have the following I use for uploading images, but I am having an issue with transparent background png images, they all get changed from transparent background to a black background. After doing some hunting around I see I neet to use imagealphablending and imagesavealpha to keep the trransparency, but it doesnt seem to be working I still get the black backgrounds, any ideas? Here is the script Code: [Select] <?php // Process new logo image if ($_FILES['logo']['tmp_name']&&$_FILES['logo']['tmp_name']!="") { // set memory limit for image ini_set("memory_limit","32M"); // Check file extension $checkfile=$_FILES['logo']['name']; $ext=substr($checkfile, -3); // Redirect if not correct image type if (!in_array($ext, array('jpg', 'JPG', 'gif', 'GIF', 'png', 'PNG'))) { header("Location: ../control_index.php?sponsors=error1"); // Close database connection mysql_close($link); exit (); } // Create logo image (300px wide) $file=$_FILES['logo']['tmp_name']; list($width, $height)=getimagesize($file); // Scale to width $main_width=300; $main_height=$height*($main_width/$width); if ($ext=="jpg"||$ext=="JPG") { $image=imagecreatefromjpeg($file); $newname="sponsor".time().".jpg"; } if ($ext=="gif"||$ext=="GIF") { $image=imagecreatefromgif($file); $newname="sponsor".time().".gif"; } if ($ext=="png"||$ext=="PNG") { $image=imagecreatefrompng($file); $newname="sponsor".time().".png"; } // Create main image file $main_image=imagecreatetruecolor($main_width, $main_height); imagecopyresampled($main_image, $image, 0, 0, 0, 0, $main_width, $main_height, $width, $height); $cp_file="../images/sponsors/".$newname; $site_file="../../images/sponsors/".$newname; if ($ext=="jpg"||$ext=="JPG") { imagejpeg($main_image, $cp_file, 100); imagejpeg($main_image, $site_file, 100); } if ($ext=="gif"||$ext=="GIF") { imagegif($main_image, $cp_file, 100); imagegif($main_image, $site_file, 100); } if ($ext=="png"||$ext=="PNG") { // Turn off alpha blending and set alpha flag imagealphablending($main_image, false); imagesavealpha($main_image, true); imagepng($main_image, $cp_file, 9); imagepng($main_image, $site_file, 9); } ?> OK, so I have a mail function code: Code: [Select] $to = "$email"; // Change this to your site admin email $from = "events@final.net46.net"; $subject = "Thank You for Registering for $event. "; //Begin HTML Email Message where you need to change the activation URL inside $message = "<html> <head> <style type='text/css'> #apDiv1 { position:absolute; left:338px; top:278px; width:311px; height:129px; z-index:1; } #pic { position:relative; left:0px; top:0px; } #apDiv2 { position:absolute; left:50px; top:207px; width:181px; height:149px; z-index:2; } #apDiv2 { text-align: center; } </style> </head> <body><div id='apDiv1'> <table width='408' border='1' cellspacing='2' cellpadding='2'> <tr> <th width='90' scope='col'>Event(s):</th> <th width='298' scope='col'>"; $sql = ("SELECT * FROM Events WHERE eventid='$eventid'"); $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $event = $row['event']; $startdate = $row['startdate']; $enddate = $row['enddate']; $description = $row['description']; $location = $row['location']; $subevent1 = $row['subevent1']; $subevent2 = $row['subevent2']; $subevent3 = $row['subevent3']; $subevent4 = $row['subevent4']; $subevent5 = $row['subevent5']; $subevent6 = $row['subevent6']; $subevent7 = $row['subevent7']; $subevent8 = $row['subevent8']; } if (!empty($title1)) { $message .= "<br/>$title1"; } if (!empty($title2)) { $message .= "<hr><br/>$title2" ; } if (!empty($title3)) { $message .= "<hr><br/>$title3"; } if (!empty($title4)) { $message .= "<hr><br/>$title4"; } if (!empty($title5)) { $message .= "<hr><br/>$title5"; } if (!empty($title6)) { $message .= "<hr> <br/>$title6"; } if (!empty($title7)) { $message .= "<hr><br/>$title7"; } if (!empty($title8)) { $message .= "<hr><br/>$title8"; } echo "</div>"; ?> <?php $message .=" </th> </tr> <tr> <th>Price:</th> <th> $ $total </th> </tr>"; ?> <?php $message .=" <tr> <th>Registrant:</th> <th> $name </th> </tr> </table>"; ?> <?php $message .=" <div id='pic'> <img src=\"http://final.net46.net/button/boyscout.jpg\"> <div id='apDiv2'>$name <p> </p> <p> </p> <p><a href='final.net46.net' target='_new'><strong>Troop 78 Home</strong></a></p> <p> </p> <p> </p> <p><strong><a href='http://www.cornhuskercouncil.org'>Cornhusker Council</a></strong></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> </body> </html>"; ?> <?php // end of message $headers = "From: $from\r\n"; $headers .= "Content-Type: text/html\r\n"; $to = "$to"; // Finally send the activation email to the member mail($to, $subject, $message, $headers);I would like this image <img src=\"http://final.net46.net/button/boyscout.jpg\"> to be the background.............and everything else is layered on top of that.........how can I do this? Hi. I am looking for a way to have a button that toggles the background colour of my website. So for instance, I will have one button called 'switch to light', when its clicked it switches the colour of the background to a light colour, and another button replaces this that says 'switch to dark', and so on. I have turned to PHP because it appears to be the only way I would be able to have the change saved throughout the site, when pages are refreshed. However, I am a complete newbie, so have no idea what to do! Anyone that can help is a life saver! Thanks |