|
|
I want to create a button on a php pafe like a form now after pressing this button i should load an image. Now the I have done this. when the image is appearing it's on the other page than where the button was. I want to have the button on the same page. Left hand side i have a set of buttons and pressing each button should load image on the right side of the same page. I should be able to see the button and image both. Please help me how can I achieve this. Is it possible using only php. ?? Thanks for any help.
[code]
<form method="post" action="">
<input type="submit" name="submit" value="Submit Form">
</form>
[/code]
|
|
|
|
|
When you submit the form a new page is loaded. You could make the new page look the same but with your new image embedded in it using only PHP.
Or you could load the image inside a frame or iframe by targetting the frame from the form tag.
Or you could load the image using Javascript.
Also, your PHP code appears to be loading an image using a GD function and then serving it to the browser without changing it at all - unless you are planning to draw on the image or resize it or something, this is very inefficient.
|
|
|
|
|
Hi all,
There are so many articles on the web about 'how to send mails in PHP' using the mail function. But actually it gives lots of errors for me. Have a look at the code segment I tried.
$to = "to@gmail.com";
$subject = "subject goes here";
$message = "message of the email goes here";
$from = "from@gmail.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent ";
When i try the code, gives the following error.
Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.emailsrvr.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in F:\WorkOn\PHP\MyPHPSites\emai_test.php on line 10
How can I workaround with this?
Thanks in advance.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: How can I workaround with this?
Check why the server smtp.emailsrvr.com is not accepting your mail request. I just tested it and it hangs after the HELO command, and then drops the connection. You need to contact the site administrator.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
No the request accepting. But no luck. I'll check with a different connection if possible, and let you know.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: No the request accepting.
I'm not sure what you mean by this, but when I tried to connect manually it definitely timed out on the initial HELO command, and then dropped the connection. You need to check with the site what the correct connection protocol is - it may be that you need to use a different port.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Yes, when I try to telnet to the port it is not allowed to connect. Seems my settings are invalid or the connection dropped somehow by my network. I'll check and let you know.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Did you telnet to port 25?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Yes I do, but the connection is fail. Seems my network not allowed to connect.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
the process you are using is wrong. Please read about how email works. and also follow the link to email using gmail smtp server
link[^]
|
|
|
|
|
I couldn't find any example in that download bundle. However I tried what that tutorial suggest but it didn't work either.
Fatal error: Cannot access empty property in ...\phpmailer\phpmailer.inc.php on line 271
I appreciate your help all the time...
CodingLover
|
|
|
|
|
follow the instruction link
|
|
|
|
|
Hi guys, whats the best way to learn perl fast. i know Java very well.
|
|
|
|
|
|
Dowload a perl distro - install it and type perldoc perlintro and start reading.
Also if you have an aversion to spending money download the following free
book http://www.greglondon.com/iperl/[^
it'll get you going
|
|
|
|
|
Here is how I learn most languages (this may just be me but it seems to work best). I am always impatient and respond to early success as most do.
1. Rapidly scan the online or offline doc to get a feel for it. This helps create a context.
2. Read some short examples written by others. Lookup the commands you don't understand, etc. Run the examples to see what they really do.
3. Pick a limited scope project. I often build a phone book app. This gives me a reference point on some constructs, syntax, pros and cons of the language.
4. Try your target project and learn as you go. Stay away from the more complex constructs at first. Learning them later is great and super productive in some cases, e.g. map.
I have written a lot of Perl over the last 5 years. I often mix bash and Perl (plus some dialog for a simple GUI) to create console apps quickly. I don't find X-Windows necessary most of the time for what I need.
I like bash with its new enhancements. Some things are still a lot easier in Perl. Sometimes using both on a project (assuming it will be used in *nix) is the best.
To me Perl is not a dead language any more than bash is. The are just special purpose languages. If you need a general purpose language then use one. If you try to make a general purpose language special purpose then you may be taking the long way around. Why do that, other than the challenge?
"Courtesy is the product of a mature, disciplined mind ... ridicule is lack of the same - DPM"
|
|
|
|
|
There is a learning perl book by O'Reilly.
My advice is to skip the first chapter. Read the rest and come back to the first chapter.
|
|
|
|
|
Phiri_code wrote: whats the best way to learn perl fast.
Where "fast" means one day or one month?
And "learn" means that you can maintain existing apps, write a shopping cart application from scratch or just write some simple code?
Perl is significantly different than java. If you have significant experience in java with regexes then that would help in perl since you wouldn't need to relearn all of the rules there. However there is still semantics and libraries that one must learn.
|
|
|
|
|
|
classes[^]
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
|
Hi,
We are about to tie up with our competitors site. So anyone who is member of that site, can access our site after entering their username and password used in our competitors site.
Would this be a good solution, if we ask them to write a web service that talks to their database member table and we can then communicate to that web service to allow the members to log inn using their existing username and password?
Thanks
modified 8-Feb-12 6:18am.
|
|
|
|
|
Question fixed by OPWrong forum?
modified 8-Feb-12 10:36am.
|
|
|
|
|
oops... lol, sorry it was for lounge.
Sorted now..
|
|
|
|