You can use $_REQUEST instead, which fetches data from both GET and POST, but also from Cookies. Altho this isn't a good idea to use due to security issuesJattenalle wrote:Not if the site is properly coded.Noctrine wrote:You can convert them to gets actually.
If you use $_POST[] or $_GET[] then only that method will work.
Sending $_GET[] variables when a page expect $_POST[] will result in nothing.
There are archaic, outdated, insecure, unsupported ways to just grab data no matter where it's coming from.
But that's a VERY bad idea.
PHP Tips and Tricks
Re: PHP Tips and Tricks
--- Game Database ---
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
Re: PHP Tips and Tricks
Code: Select all
<tr>
<td width="14%"><font face="Arial">Hitpoints:
<table border="1" width="100" height="10">
<tr>
<td width="100%"><img border="0" src="test1.png" width="<?php echo floor($playerinfo3['hpoints'] / $playerinfo3['maxhp']*100) ; ?>" height="10"></td>
</tr>
ok so test.png is a 1 pixel wide picture of just the color red .. and the bar is 100 pix wide .. so when you get your percentage that your health is (current health - max health * 100) then that number is how wide the 1pix picture is inside ya graph .. and no crap .. i worked this out myself .. thanks halls .. i knows its messy and sstuff, but u get it...
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: PHP Tips and Tricks
nice work!
Glad to see PHP treating you so well.
Glad to see PHP treating you so well.
Re: PHP Tips and Tricks
This is what i ended up with for my hitpoints bar...
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: PHP Tips and Tricks
that is very good, i like the style a lot.
Re: PHP Tips and Tricks
Never has a truer statement...Jattenalle wrote:Even if positioning DIVs is a fucking pain in the ass...
But yeah, even when using tabular data. The trend has been going to a more CSS oriented site. I had a really nice site that showed why you should only use tables for tabular data but I can't seem to find it right now.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: PHP Tips and Tricks
i hate tables with a passion BUTTT you can use the current table you have mixed with css and div tags to make it look real nice.
I personally love div tags and css sheets but like Jatt said its a pain sometimes. Mainly when you are trying to center the whole page around different size monitors and browsers.
I personally love div tags and css sheets but like Jatt said its a pain sometimes. Mainly when you are trying to center the whole page around different size monitors and browsers.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: PHP Tips and Tricks
I also prefer DIVs and CSS over tables, and they are not that bad with Dreamweaver CS4.
The indelible lord of tl;dr
Re: PHP Tips and Tricks
Exactly! Best website maker everJattenalle wrote:Pfft, real men code their sites in Notepad++Jackolantern wrote:I also prefer DIVs and CSS over tables, and they are not that bad with Dreamweaver CS4.
--- Game Database ---
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
Re: PHP Tips and Tricks
Quick question :: is just using $_SESSION['strings'] / rather than using $_POST's alright .. just makes it easier to call "global" variables that have already been put into the session...???\
\I hope i said that properley
\I hope i said that properley