I Need Help In PHP Commands - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: I Need Help In PHP Commands (/showthread.php?tid=11776) |
I Need Help In PHP Commands - dareknyght - 09-04-2010 This is a piece of php code! I want to change it's font (alignment, color, weight). Please copy this code, apply the color, alignment and weight commands properly and post under the thread! PHP Code: if(isset($_SESSION['views'])) Thanks In Advance RE: I Need Help In PHP Commands - ndee - 09-04-2010 Seriously? How could you not know basic CSS, and decided to learn PHP? Do something along the lines of: PHP Code: echo "<span style='color #ff0000'>Views=" . $_SESSION['views'] ."</span>"; RE: I Need Help In PHP Commands - |cM| - 09-04-2010 From your post, I take that you want to style the output (i.e. echoing the total views) then you might want to place the code in a div (or echo out into a div) and give an id of 'views' then use CSS to style it. Example: PHP Code: <style type="text/css"> EDIT: Beaten to it :p RE: I Need Help In PHP Commands - dareknyght - 09-06-2010 (09-04-2010, 04:12 AM)ndee Wrote: Seriously? How could you not know basic CSS, and decided to learn PHP? see this page! www.dareknight.110mb.com If i don't know the basic css then i cant make it! i was just too lazy at that time and it made me a little confusing beacuse the Views= was getting fonted but the number was'nt! you can check the crack challenge on my site! RE: I Need Help In PHP Commands - BreShiE - 01-15-2012 I just quickly wrote this up in Dreamweaver for you: PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> RE: I Need Help In PHP Commands - AceInfinity - 01-15-2012 BreSHie you've been learning PHP and you don't know how to use the increment operator yet? PHP Code: $_SESSION['views']++; RE: I Need Help In PHP Commands - Gaijin - 01-15-2012 Also.... this line makes it even faster.. PHP Code: $_SESSION['views'] = (isset($_SESSION['views'])) ? ($_SESSION['views'] + 1) : 1; |