AndyB
-
Posts
5,465 -
Joined
-
Last visited
Never
Posts posted by AndyB
-
-
I've looked over your code a couple of times and couldn't really follow what it was trying to do ... but I know a bit about captchas. Enough to write a free, downloadable, complete, simple, script that does the same thing. You're welcome to use it - [a href=\"http://www.digitalmidget.com/php_noob/captcha.php\" target=\"_blank\"]demo/download here[/a] - if your's refuses to play nicely.
-
[a href=\"http://www.w3schools.com/css/tryit.asp?filename=trycss_background-attachment\" target=\"_blank\"]http://www.w3schools.com/css/tryit.asp?fil...ound-attachment[/a]
example
[code]<style type="text/css">
body
{
background-image:
url('smiley.gif');
background-repeat:
no-repeat;
background-attachment:
fixed
}
</style>[/code] -
Do you mean that you have [b]one field[/b] in each [b]row[/b] of your database that looks like url1,url2,url3 (all joined up but separated with commas)? If that's so you you need to retrieve the field and then use the explode() function on the comma separator to generate an array of links ...
-
Without seeing any code, the probable solution is to use your image creation script as is (i.e. with the correct header type) and call it from the page display script via <img src="myscript.php">
-
[code] $string = "whatever your string is ....";
$first = {$string[0]};
if ($first>0) {
echo "#";
}
echo $string;
?>[/code] -
You have major html problems there, which are likely a root cause of many of your problems. There should only be one <html></html> set, only one <body></body> set ... you have many. Wild guess - you're using includes and have forgotten to remove the duplicate tags.
I'd suggest you try to write valid code (which really isn't difficult at all).
One reason why your page loads slowly might be that almost all the images are remotely hosted. -
[a href=\"http://www.halfadot.com/freehelp/imagepop.htm\" target=\"_blank\"]http://www.halfadot.com/freehelp/imagepop.htm[/a] - the examples there should how you how to do it with reusable code.
-
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]i only get what ever is in the Action= without the value of the drop box ??[/quote]
Considering that the Action= is never changed by the form, that's not really surprising.
The value passed from the drop box is $_POST['select'] -
Can you explain exactly what it is you want the script to do? Does it only display one icon? Can it display multiple icons? If so, under what circumstances?
Maybe what you want is this:
[code]if ($row['important'] == "yes") {
$icon = "$template_path/images/important.gif";
} else {
if ($row['Locked'] == 1) {
$icon = "$template_path/images/locked_topic.gif";
} elseif ($row['Type'] == "Poll") {
$icon = "$template_path/images/poll.gif";
} elseif ($read_status == "new") {
$icon = "$template_path/images/new.gif";
} elseif ($read_status == "old") {
$icon = "$template_path/images/old.gif";
} elseif ($reply_num >= 10) {
$icon = "$template_path/images/hottopic.gif";
}
}[/code] -
More or less, this should point the way ..
[code]if (file_exists($img_url)) {
echo "<img src='". $img_url. "' border='0' alt=''>";
} else {
echo "<img src='classic/nopic.jpg'>";
}[/code] -
[a href=\"http://www.blue105.com/internet/support/mysql_offline.html\" target=\"_blank\"]http://www.blue105.com/internet/support/mysql_offline.html[/a] looks like simple answers to those questions.
-
No. But the usual 'work around' for what you want to do is an image that's a gradient from something to the background colour of your page, and then use the CSS background property alternatives to prevent the background from tiling .... [a href=\"http://www.w3schools.com/css/pr_background-position.asp\" target=\"_blank\"]http://www.w3schools.com/css/pr_background-position.asp[/a]
-
[a href=\"http://ca.php.net/manual/en/function.unset.php\" target=\"_blank\"]unset()[/a] in the manual.
-
[code] echo abs($days);[/code]
-
Use constants not numbers - it's quicker to calculate when a numerical value is pre-assigned to a program 'constant'. For example, changing all the absolute values in a line such as this:
[code]$coordinate[$i] = (((($row2['x'] - 312822) / 10) / 7.118) + 4) . ',' . (1069 - (((($row2['y'] - 334713) / 10) / 7.116) - 2));[/code]
should improve execution speed. -
Pretty weird question :)
256 is three bytes (unsigned), GB is two bytes. -
[code]<?php
$mystring = "this is text with spaces";
$words = explode(" ",$mystring); // split into array on space separator
echo $words[0]; // first element of array, i.e. this
?> [/code] -
fingers crossed .... try adding a name to it <img name="whatever" etc.
[a href=\"http://www.htmlgoodies.com/tutorials/web_graphics/article.php/3479941\" target=\"_blank\"]http://www.htmlgoodies.com/tutorials/web_g...cle.php/3479941[/a] -
The strip_tags() might do all you need.
-
Wait a minute! Where does the information actually come from about player names and score (or whatever is used to rank them)? If it's from a database then you can construct a single query to retrieve the highest 19 scores, ordered by score .... Bit more information please, then we'll figure out what this has to do with a while loop, or a for loop, or a counter.
-
I don't think I understand the question. If you want to move files from one host to another, use something like [a href=\"http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html\" target=\"_blank\"]PuTTY[/a] as the Telnet/SSH client. If - as imageshack does - you want to upload files from your computer (or your site users want to), then use a simple image uploader such as [a href=\"http://fundisom.com/phparadise/php/image_handling/image_upload_and_resize\" target=\"_blank\"]LixlPixel's excellent free script[/a].
-
[code]<?php
.....
if ($somevar==1) {
?>
<table><tr><td>
Look, Ma. Just html here
</td>
</tr>
</table>
<?php
}
// some more php code
?>[/code] -
Visually, it's quite horrid. The header is a disaster. The color choices are unappetizing. I don't know why all the text has to be bold. Those can all be fixed (soon, one hopes). You don't have to go overboard with images but the 'net is a visual medium - add a bit of imagery as relief from text, text, text.
On the technical side, it doesn't work too well at 800px resolution (that's probably still 40% of all users), and the navigation gives a bit of a surprise when you choose Home > News and get the 'main' menu options reappearing on the right of the News menu. Some pages have an inexplicable chunk of space after all the content.
If you want a link-rich, text-heavy, site give a thought to users who don't use a mouse or who use a screen reader ... provide links that skip navigation sections.
The concept is fine, but the execution leaves a lot of room for improvement.
-
[!--quoteo(post=349469:date=Feb 25 2006, 10:45 PM:name=Twentyoneth)--][div class=\'quotetop\']QUOTE(Twentyoneth @ Feb 25 2006, 10:45 PM) [snapback]349469[/snapback][/div][div class=\'quotemain\'][!--quotec--]What it does, when you click submit, it sends you to "submit.php" and loads nothing but my layout. I dont get any error messages, my host has disabled it.[/quote]
But there isn't any layout stuff in the version of submit.php that you posted.
Try this:
#1 change your form action to point to submit2.php and save that code
#2 save exactly the code you posted above (as submit.php) as submit2.php but add the two error reporting lines from the post by hitman6003
#3 upload the revised form code and submit2.php to your server
Run the new version of the form script. If there are no errors, you should see a blank page. Check the email address you are sending this to, including the spam and/or junk folders (although using a POP3 email address usually works more reliably than a free webmail address). Let us know what happens.
php and mysql help
in PHP Coding Help
Posted
[code]$sql = "INSERT INTO `list` (id, name, link, comments) VALUES ('', '$name', '$link', '$comm') ";[/code]