| | |
Image Button Problem??
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 293
Reputation:
Solved Threads: 11
PHP Syntax (Toggle Plain Text)
<?php if(isset($_POST["send"])) { $name = $_POST["name"]; $email = $_POST["email"]; $msg = $_POST["msg"]; echo(" Hello!<br />"); if(empty($name)) { echo(" - There was no name!<br />"); } if(empty($msg)) { echo(" - There was no message!<br />"); } // IF THEIR ARE NOT EMPTY if(!empty($name) && !empty($email) && !empty($msg)) { //code for email } } ?> <form id="form" action="" enctype="multipart/form-data" method="post"> <div class="column1"> <div class="row"> <input type="text" class="input" value="Name:" name="name"/> </div> <div class="row"> <input type="text" class="input" value="E-mail:" name="email" /> </div> <div class="row"> <input type="text" class="input" value="Phone:" name="phone"/> </div> </div> <div class="column1"> <div class=""> <textarea cols="30" rows="2" name="msg">Message:</textarea><br /> <div class="div"> <input type="image" src="images/cler1.jpg" name="send" /> <input type="image" src="images/cler2.jpg" /> </div> </div> </div> <div class="clear"></div> </form>
When i click on image to send not getting a simple echo message
how to do that??
•
•
Join Date: May 2008
Posts: 27
Reputation:
Solved Threads: 0
When you are submitting the form are you deliberately not filling out a form to check if the error comes through, or are you filling the form out all the way and have an echo message in your mail script that isn't showing up?
Something you could try is making another div box in your page. Then insert a php script kinda like this in the box:
and change the if statements in your main code to this:
Something you could try is making another div box in your page. Then insert a php script kinda like this in the box:
php Syntax (Toggle Plain Text)
<? if(isset($yourEcho)) { echo $yourEcho; } ?>
and change the if statements in your main code to this:
php Syntax (Toggle Plain Text)
if(empty($variable)) { $yourEcho = "No variable set"; }
Last edited by peter_budo; Dec 2nd, 2008 at 8:18 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
I am pretty sure you can have only one image to submit.
Here is a workaround:
http://blogs.translucentcode.org/mic...uttons-and-ie/
Here is a workaround:
http://blogs.translucentcode.org/mic...uttons-and-ie/
Do a var_dump($_POST);
See what you get.
See what you get.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
Similar Threads
- signout image button problem (ASP.NET)
- image button problem (ASP.NET)
- uplaoding an image using a button (Python)
- how we display image on button? (VB.NET)
- Adding an Image to a JPanel (Java)
- please anybody help to solve keydown event for enter button problem (HTML and CSS)
- Tkinter Button(s) (Python)
- Preview Upload Image Problem (PHP)
Other Threads in the PHP Forum
- Previous Thread: ftp_ssl_connect problom
- Next Thread: How to add google adsence module n drupal CMS?
| Thread Tools | Search this Thread |
ajax apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error errors execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google href htaccess html image include insert integration ip java javasciptvalidation javascript joomla keywords limit link login loop mail matching menu mlm multiple mysql number oop paypal pdf php problem query radio random recursion recursive regex remote script search server sessions shot sms soap source space sql subscription syntax system table tag tutorial tutorials update upload url validator variable video web xml youtube






