Click here to Skip to main content
15,891,136 members
Home / Discussions / Web Development
   

Web Development

 
QuestionRe: help with word wrap please Pin
Richard Deeming9-May-13 2:10
mveRichard Deeming9-May-13 2:10 
QuestionDatabase Error Pin
Rajib087-May-13 22:56
Rajib087-May-13 22:56 
Generalhelp for Google +1 button Pin
Gnana Akilan7-May-13 8:54
Gnana Akilan7-May-13 8:54 
GeneralRe: help for Google +1 button Pin
Sandeep Mewara7-May-13 23:03
mveSandeep Mewara7-May-13 23:03 
Questionnew to programming and need to write a virtual classroom program Pin
dowells7-May-13 2:02
dowells7-May-13 2:02 
AnswerRe: new to programming and need to write a virtual classroom program Pin
Richard MacCutchan7-May-13 2:53
mveRichard MacCutchan7-May-13 2:53 
QuestionHow Best to Build Web App to Receive & Post Async Data From Server Pin
Member 817307430-Apr-13 8:43
Member 817307430-Apr-13 8:43 
QuestionForm submit error message Pin
Tichaona J29-Apr-13 5:04
Tichaona J29-Apr-13 5:04 
I am trying to get my code to check the “username” field and print an error message letting the user know that they left a field blank. Now before all I had was the below code of which it worked in part, in the sense that the below code was executed when the submit button was clicked on and when the page was refreshed.

PHP
if (isset($_POST['username'])) {

            emptyField();

                      }


              function emptyField()
                 {
                   $var1 = "">*Field missing entry...";
                  echo $var1;
                 }


To fix this I the added the below code, which now meant that the code only worked if the user clicked on the submit button and didn’t work if the page is refreshed. However I’ve also noticed that even when there is text in the “username” field and say the user got there password wrong (not proceeding to the next page), it simply cleared all fields and printed “*Field missing entry...*” Why is this and how do I sort this out…?

PHP
<?php


                           if(isset($_POST['submit']))
                               {
                                   fieldChecker();
                               }


                             function fieldChecker(){

                                   // if the field is empty...
                                   if (isset($_POST['username'])) {

                                       emptyField();

                                        }

                             }

                                function emptyField()
                                   {
                                     $var1 = "">*Field missing entry...";
                                    echo $var1;
                                   }
                         ?>

AnswerRe: Form submit error message Pin
rpprojects16-May-13 16:11
rpprojects16-May-13 16:11 
GeneralRe: Form submit error message Pin
Tichaona J26-May-13 7:37
Tichaona J26-May-13 7:37 
GeneralRe: Form submit error message Pin
David Kroj26-May-13 23:54
David Kroj26-May-13 23:54 
Questioncrystal reports not working for visual studio 2010 Pin
Member 999911226-Apr-13 7:05
Member 999911226-Apr-13 7:05 
AnswerRe: crystal reports not working for visual studio 2010 Pin
Sandeep Mewara26-Apr-13 7:33
mveSandeep Mewara26-Apr-13 7:33 
GeneralRe: crystal reports not working for visual studio 2010 Pin
Member 999911226-Apr-13 7:35
Member 999911226-Apr-13 7:35 
QuestionGMail SMTP Outgoing Problem Pin
DarkSorrow3825-Apr-13 3:58
DarkSorrow3825-Apr-13 3:58 
AnswerRe: GMail SMTP Outgoing Problem Pin
Bernhard Hiller26-Apr-13 0:36
Bernhard Hiller26-Apr-13 0:36 
GeneralRe: GMail SMTP Outgoing Problem Pin
DarkSorrow3830-Apr-13 3:09
DarkSorrow3830-Apr-13 3:09 
AnswerRe: GMail SMTP Outgoing Problem Pin
Richard MacCutchan30-Apr-13 6:29
mveRichard MacCutchan30-Apr-13 6:29 
QuestionGetting Error while transferring records from one database to other using web application Pin
Parag Raibagkar22-Apr-13 20:13
Parag Raibagkar22-Apr-13 20:13 
AnswerRe: Getting Error while transferring records from one database to other using web application Pin
Sandeep Mewara22-Apr-13 22:43
mveSandeep Mewara22-Apr-13 22:43 
QuestionDisplaying data in chart with import csv file to database sql Pin
Dhimas Yuli PW22-Apr-13 16:34
Dhimas Yuli PW22-Apr-13 16:34 
AnswerRe: Displaying data in chart with import csv file to database sql Pin
Jasmine250123-Apr-13 8:18
Jasmine250123-Apr-13 8:18 
QuestionHelp trying to set a 12 hour cookie for a DHTML popup Pin
Member 1000506922-Apr-13 5:36
Member 1000506922-Apr-13 5:36 
QuestionCheckbox check should automatically and slowly fadeout to unchecked Pin
Member 937599314-Apr-13 7:57
Member 937599314-Apr-13 7:57 
AnswerRe: Checkbox check should automatically and slowly fadeout to unchecked Pin
Martin-OHV14-Apr-13 23:32
Martin-OHV14-Apr-13 23:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.