AndyB
-
Posts
5,465 -
Joined
-
Last visited
Never
Posts posted by AndyB
-
-
[code]while ($row= mysql_fetch_array($result)){
$artname = $row["articlename"];
$arturl = $row["articleurl"];
if ($count<10) { echo " "; }
echo "$count.) <a href='$arturl'>$artname</a><br>";
$count++;
}[/code] -
[a href=\"http://www.onlamp.com/pub/a/php/2002/12/05/one_time_URLs.html\" target=\"_blank\"]http://www.onlamp.com/pub/a/php/2002/12/05..._time_URLs.html[/a]
When you want to give out a URL that only works for one download - no matter how many people know the URL -
Like a lot of other things, it's not very demanding in technical terms and it's very demanding in terms of time (which hardly anyone has lots of to spare:))
What I'd suggest is that you do a little reading - the tutorials here are excellent - about simple php exercises like building a database, editing it, etc. Read a little about how to retrieve selected information from it (i.e. which records match a user-entered zip code). Read a little on the very simple php mail() syntax.
That should be enough to get you started on your project. When you run into a problem, ask for help here. You start it, we'll try to help you finish it. -
Thank you. That looks promising and I'll give it a shot (when I have access to the supersized monitor). Fortunately I already have a 'container' div that's doing another job on the page and I should be able to modify its properties with the max-width fixes so I'll avoid changing any html pages and just doing it with wonderful CSS.
It looks as though it isn't going to work on the body element so it's a lucky break that I already had a suitable container div I could re-style. -
It doesn't say "something is wrong", it gives you some very specific message .... that helps you understand what the problem might be. Those help people here answer your question.
[code]<body>
The result of the calcuation is
<?php echo $result; ?>
</body>
</html>[/code] -
I thought it was a neat trick as well. Here's how I applied it
[code]
body {
color:#000;
background:url('../images/page-bg2.gif');
font-family: verdana, arial, helvetica, sans-serif;
text-align:center;
margin:0;
padding:0;
max-width:990px;
width:expression(document.body.clientWidth > 990 ? "990px" : "auto" );
}[/code]
Works fine with FF, but has no effect with IE6 (on a PC at 1200px resolution). What I know about expressions would fit on the head of a pin ... did I mess up the CSS or can't that trick be used on body. -
Like this, perhaps?
[code]<?php
$pct = 50; // percent complete retrieved 'somehow'
?>
<img src="bar.png" height="10" width="<?php echo $pct;?>" alt=""/>
[/code] -
Odd client request to have a liquid layout but displayed width not to exceed 1024px (it's a very, very, long, story).
With 'good' browsers, this works fine:
[code]body {
max-width:1024px;
}[/code]
All I need is the IE-variant. [a href=\"http://www.svendtofte.com/code/max_width_in_ie/\" target=\"_blank\"]http://www.svendtofte.com/code/max_width_in_ie/[/a] explains, but I'm not getting it :(
Anyone care to help me out with the right, working, IE workaround to set the body max-width? -
[!--quoteo(post=353314:date=Mar 9 2006, 12:56 PM:name=pearljam73)--][div class=\'quotetop\']QUOTE(pearljam73 @ Mar 9 2006, 12:56 PM) [snapback]353314[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You're not passing the variable through a form, and it's therefore not a GET[] value. Because you're passing it in the address bar, $sport automatically equals the value on the next page.
[/quote]
Au contraire, my friend. Anything passed by URL is retrievable using the GET method. And since current releases of php for quite some time have register_globals set to OFF (as being less insecure), it is necessary to retrieve passed data from the GET array. That'll work whether register_globals is on or off. If you just assume $sport will exist on the next page, you're in for a big surprise when register_globals is off :) -
Part 1:
[code]
<a href="sportFind.php?sport=cricket">Cricket</a>
<a href="sportFind.php?sport=tiddleywinks">Tiddleywinks</a>
[/code]
Part 2:
[code]
<?php
// sportFind.php
$sport = $_GET['sport']; // retrieve passed variable
... more code follows ...
[/code] -
Usually means that somewhere there's an unclosed curly bracket ... quite where } belongs isn't evident (so maybe it's in the code that's included)
-
margin and padding take care of the spacing needs of 'blocks. Example:'
[code]<style type="text/css">
p {
margin-top:3px;
margin-bottom:6px;
}
[/code] -
[!--quoteo(post=352893:date=Mar 8 2006, 11:35 AM:name=salomon)--][div class=\'quotetop\']QUOTE(salomon @ Mar 8 2006, 11:35 AM) [snapback]352893[/snapback][/div][div class=\'quotemain\'][!--quotec--]I'm very dissapointed and thought this site would be much more helpful. this is like the third time I bump this topic[/quote]
.. and people here actually do have other things to do ..
If what's in the database is the same as what's in the cookie, what's the problem? If what's in the database isn't what's in the 'matching' cookie, it's never going to work.
-
[!--quoteo(post=352875:date=Mar 8 2006, 10:19 AM:name=Walbert)--][div class=\'quotetop\']QUOTE(Walbert @ Mar 8 2006, 10:19 AM) [snapback]352875[/snapback][/div][div class=\'quotemain\'][!--quotec--]So would the GD library take the co-ordinates from a database and dispaly them.... Say I'm looking for cake, it's on isle 2, shelf 2. Can this be show on the map??[/quote]
Yes ... but you'll need to read some of the GD documentation to figure out how to abstract one part of a larger image and display it. -
[!--quoteo(post=352689:date=Mar 7 2006, 07:13 PM:name=thewird)--][div class=\'quotetop\']QUOTE(thewird @ Mar 7 2006, 07:13 PM) [snapback]352689[/snapback][/div][div class=\'quotemain\'][!--quotec--]What if I'm the one creating the iframe? Is there anything I can do to give some sort of signal?[/quote]
Well, that's a different question entirely. If you created the iframe you already know that you've placed a page in it, don't you? 'Some sort of signal' - to do what? how? when? why? Add some code to it ....
[code]<?php
echo "Hello world. This is in an iframe";
$whereami = "framed";
?>[/code]
If you want to explain what you're trying to do, then maybe someone can come up with a solution for you. Otherwise, it's just a guess at what might work.
-
No. php runs on the server. iframes run on the client. Javascript can do something for you - maybe. Google from javascript frame detection and/or frame busting.
-
Archimedes .... use the metallic items to add mass to the cork until it has neutral buoyancy, i.e. its overall mass is equal to the mass of water it displaces.
-
If you opened the file with NotePad and all you see is html, then the file is html code not php code. Ask the author to send you the php file NOT the generated html.
-
Does the folder ..../gallery/thumbs actually exist? Does it have the correct permissions to allow you to save files to it?
-
Put whatever page title you want [b]before[/b] the start of the while loop.
-
[!--quoteo(post=352334:date=Mar 6 2006, 07:38 PM:name=supertanker)--][div class=\'quotetop\']QUOTE(supertanker @ Mar 6 2006, 07:38 PM) [snapback]352334[/snapback][/div][div class=\'quotemain\'][!--quotec--]What about multi-level menues? I am aiming for something around the looks of SourceForge[/quote]
You might want to take a look at some pure CSS multiple-level menus - at [a href=\"http://www.tanfa.co.uk/css/examples/css-dropdown-menus.asp\" target=\"_blank\"]www.tanfa.co.uk[/a]. Simple, fast, clean, cross-browser, etc.
-
If it helps, you're welcome to look at/use my free downloadable calendar [a href=\"http://www.digitalmidget.com/php_noob/calendar.php\" target=\"_blank\"]from right here[/a]. It's light, compact, xhtml compliant, etc.
-
Breadcrumbs is what they're called (as in Hansel & Gretel). A good php example/tutorial can be found [a href=\"http://www.zend.com/zend/spotlight/breadcrumb28.php\" target=\"_blank\"]here at Zend[/a]
-
Depends of your definition of "doesn't work". This might well work, however:
[code]$MyIp = "68.144.218.226";
$Ip = $_SERVER['REMOTE_ADDR'];
if ($MyIp != $Ip){
echo "<center><font face='verdana' size='2'>SITE UNDER CONSTRUCTION</font></center>";
exit();
}[/code]
Having trouble with PHP 4 book and running PHP 5!
in PHP Coding Help
Posted
#1 - are you actually saving your work as a .php file rather than as a .html file?
#2 - are you testing this on a live server or just in some editor preview mode?