Oops, last 2 lines should have been:[PHP]imagejpeg($new_ image);
imagedestroy($n ew_image);[/PHP]
User Profile
Collapse
-
Thanks.. I had a search on Google for an explanation like the one in your link, but hadn't found one.
For anyone else reading this, note that according to the linked page above the valid version should be:[HTML]<!--[if !IE 6]--><link href="normal.cs s" type="text/css" rel="stylesheet " /><!--<![endif]-->[/HTML]
(an extra <! in the second comment). Not sure if it makes...Leave a comment:
-
I think if you want that script you're going to have to bite the bullet and write it!
You could create several links in your page:
[HTML]<a href="image.php ?height=200&wid th=400">400 x 200</a>
<a href="image.php ?height=300&wid th=600">600 x 700</a>
<a href="image.php ?height=400&wid th=800">800 x 400</a>[/HTML]
And then you need a...Leave a comment:
-
So you want to allow a user to upload an image and then show them a preview of that image?
I'm not going to attempt to write the PHP for that here, but I will give you some pointers...
For the file/photo upload:
http://uk2.php.net/manual/en/functio...oaded-file.php
There's an example further down the page of how to use it.
For manipulating the image (making it smaller/bigger, creating a thumbnail,...Leave a comment:
-
Correct conditional comments
Hi, I'm putting some conditional comments into a page to stop Internet Explorer 6 from being the evil piece of sh!$ that it is.
I want one stylesheet for IE 6 and another for all other browsers.
So...
[HTML]
<!--[if IE 6]><link href="ie6.css" type="text/css" rel="stylesheet " /><![endif]-->[/HTML]That's easy enough. But then for all the other browsers, Microsoft... -
There are several things that might be what you're after.
The foreach loop. This loops through each element of an array.
e.g.[PHP]$my_array=array ('cow','sheep', 'dog','cat');
foreach($my_arr ay as $element){
print "$element<b r>";
}[/PHP]That would print out:
cow
sheep
dog
cat
Another thing that might help you is variable variables. They are variables...Leave a comment:
-
That's no easy task! Have you considered just putting a Google search form on your site though? I.e. a form that uses Google to search just within your site. It would be a lot easier!Leave a comment:
-
Yeah, it's working for me now as well. It seems to come and go!! I'm sure when I was building the site it was doing it, and then it stopped and then it started again today, and now it's not doing it anymore. I think I'm going to have to assume it's a bug in Firefox and leave it! I tried restarting Firefox several times earlier though, and it still played up. Maybe restarting my computer did the trick..?
Thanks anyway.Leave a comment:
-
Can you clarify this a bit? You want someone to login and THEN let them have access to another page or a value within it, like from a database or something?
Can you not just create a login page and then redirect them to the page that contains the info?
Soemthing like:
login.html
[HTML]<html><body>
<form action="validat e_login.php" method="post">
<input...Leave a comment:
-
frame target problem
Hi, I have a frameset with a menu down the left and a main frame on the right. (The menu contains a flash jukebox, which I why it's in a frame, so that you don't have to restart the jukebox every time you click on a link in the menu.)
I have named the main frame name="main" in the frameset, and all of the links in the menu have target="main" in them. But when viewing it in Firefox it doesn't open the links into... -
I'm being lazy and not bothering to fully read your code, so forgive me if I don't get this quite right..
[PHP]$total = 0; $totalprice = 0;//this isn't really necessary, though it wont hurt
while ($row_rs_newEnq uiries = mysql_fetch_ass oc($rs_newEnqui ries))
{
$total_price_fo r_this_row = $row_rs_newEnqu iries['Counts'] * $row_rs_newEnqu iries['Price'];
$echoStr .= "
<tr bgcolor='#ebebe b'...Leave a comment:
-
Ah, simple as pie then! /*note sarcasm*/
This is going to be one of those things where my arrogance causes me to attempt something that's well out of my depth. I'm sure I'll enjoy trying though!
I assume EE is electronic engineering? This is where my music degree lets me down!Leave a comment:
-
I think I know what you mean... You want to make the table first, and THEN put all the values into it. That's not really possible (well it might be, but only in a very odd and pontless complex way!). I think you should go with the method shown above. You can always add a table row before the while loop with the table headers in it, and similarly after the while() loop at the bottom if you want anything at the base of the table.Leave a comment:
-
How to make my own bluetooth device?
Hi, this is probably a bit of a long shot, but I would like to make a simple bluetooth device that just has a couple of lights on it and a light sensor, which can communicate with a mobile phone (or a bluetooth-capable computer).
All I want it to be able to do is allow the phone/computer to read the light level measured by the light sensor and turn the lights on the device on and off.
Does anyone have any idea where... -
Could you just do this?..
[HTML]<html><head></head><body>
<form action="whateve r" method="post">
<textarea name="my_textar ea">
<?php
include 'page_that_gets _stuff_from_dat abase.php';
?>
</textarea>
</form></body></html>[/HTML]Leave a comment:
-
I might be wrong but at a quick glance it looks like you're using fopen to open/write to a file on your local server. cURL is usually used to access other servers via http. Although having said that I think you can connect to your own server using curl, but it would be just like a normal web user connecting to your server, i.e. it wouldn't allow you to write to a file, so it would be pointless! Not sure...anyone else?..Leave a comment:
-
The cURL module lets you do all of that kind of stuff very easily. And fsockopen allows you to connect to other websites. I think that the problem lies with your webhost rather than with php.Leave a comment:
-
Yeah, that's fixed it. Thank you!
I'll have a little gander at that page, and another gander at my code to make sure that I really understand what's going on.
CheersLeave a comment:
-
It's a bit hard to tell where it's going wrong without being able to play around with it. But try printing out the cookies that IE has sent to the page, if IE has not sent the PHPSESSID cookie back to you then you know... well you know that it's not sending the cookie back!!
[PHP]print $_COOKIE['PHPSESSID'];
//OR
print_r($_COOKI E);[/PHP]
If that does turn out to be the problem, then I would suggest installing...Leave a comment:
-
Hi Garrow, thanks, that's definitely it. Now I might be being a bit stupid here, but I don't understand why the div below the forms covers up the forms. I've checked that I've got all the <div> tags nested and closed properly. So why does the div at the bottom move up to cover up the form fields above it? And it doesn't seem to cover up the words (or labels) "Email:" and "Password:" . When you click the links which hide/show...Leave a comment:
No activity results to display
Show More
Leave a comment: