Jump to content

bindiya

Members
  • Posts

    97
  • Joined

  • Last visited

    Never

Everything posted by bindiya

  1. still i get error iam pasting my old code.to this code i need to print the message if the amount is not entered or the is not in nmbers. echo "<table width='599' align='center'><tr><td></td><td>Username</td><td></td><td> $username</td><td></td></tr>". "<tr><td></td><td>Name</td><td></td><td> $fname</td><td></td></tr>". "<tr><td></td><td>Email</td><td></td><td> $email</td><td></td></tr>". "<tr><td></td><td>Company Name</td><td></td><td> $companyname</td><td></td></tr>". "<tr><td></td><td>Address</td><td></td><td>$address</td><td></td></tr>". "<tr><td></td><td>State</td><td></td><td> $state</td><td></td></tr>". "<tr><td></td><td>Country</td><td></td><td> $country</td><td></td></tr>". "<tr><td></td><td>Website</td><td></td><td> $website</td><td></td></tr>". "<tr><td></td><td>Description Of Payment</td><td></td><td> $pay_desc</td><td></td></tr>". "<tr><td></td><td>Amount in USD</td><td></td><td><input type='text' name='amnt' id='amnt' /> </td><td></td></tr>"; }
  2. but my code is itself inside an echo at that time how will i check
  3. I have a text firld to enter amount af a book,But i need to check whether the data entering is numeric only eg:70.98 etc. how can i achieve this. my code is echo"<table><tr><td></td><td>Amount in USD</td><td></td><td><input type='text' name='amnt' id='amnt' /> </td><td></td></tr></table>";
  4. I have a txtarea which has to be made blank by removing all the spaces i it on load. how can i do that
  5. error printing like "username and login doesnot match ' in my popup window is the one i need, after login check
  6. but my php code is in the same page and when i alert the error message through javascript it works.But the echo error mesg doesnot work
  7. I have a login modal window which is user for entering the login and password, and check it with the database.If the login and password is not there i nthe database the message shuld be displayed in the popup window itself. But in my case the popup window disapperas if the login details are wrong. how shuld i code for this. My code is pasted below. <div id="cover"></div> <div id="dialog"> <form action='' method='post' name='onlinepay'> <table width="388" border=1><tr><td colspan="4" align="right"></td><td align="right"><a href="index.php" onclick="closePopUp('dialog');"><img src='images/close.jpg' align="right" /></a></td></tr> <tr><td width="11" ></td> <td width="90">Username </td> <td width="57">:</td> <td width="147"><input type='text' name='username' id='username' /></td><td width="59"></td> </tr> <tr><td></td><td>Password</td><td>:</td><td><input type='text' name='password' id='password' /></td><td><input type='submit' name='submit' id='submit' value="Login" /></td></tr><tr><td colspan='5'><?php //connection statements goes here if(isset($_POST['submit'])){ $username=$_POST['username']; $password=$_POST['password']; $sql="select username,password from register where username='$username' and password='$password'"; $result=mysql_query($sql); $row=mysql_fetch_row($result); $row1=mysql_num_rows($result); if(($row['0']==$username) && ($row['1']==$password)){ header ('Location:themes/index.php'); } else{ echo "Username and password doesnot match"; } } ?> </td></tr> <tr><td colspan="5"><hr color="#999999" /></td></tr><tr><td></td><td colspan='2'><a href="javascript:void window.open('themes/forgotpassword.php?fullview=Y','','height=350,width=525,resizable=yes,scrollbars=yes')">Forgot password? </a> </td> <td><a href='register.php'>New User</a></td> <td align='center'> </td> </tr> </table> </form>
  8. I have a radiobutton with 5 sub radiobutton option.If only i check this radiobutton the options need to be showed.Is there any way to dothis.
  9. I have a html form. i have the fields like username,password,firstname,address. I have placed the username inside another form because onblur event this textfiels value should b recieved by the js. But js is not recieving the value.Gives the error'document.usercheck.username is null or nota an object. My code is <script language="javascript"> function submit_check(){ var name=document.usercheck.username.value; location.href="user_availability.php?login="+name; document.forms['usercheck'].submit(); } html------------- <form name='registration' action='' method='post' onsubmit="return verify();"> <table width="599" align='center'> <tr><td colspan='5'></td></tr> <tr><td width="33"></td> <td width="187"><!--UserName<suponblur='submit(this.value);'>onblur='submit_check(this.value);'--> User Name <font color="#CC0000">*</font></sup> </td> <td width="22">:</td> <td width="148"> <div> <form name='usercheck' method="post" action=''> <input name="username" type="text" id="username" value="" maxlength="15" onblur="submit_check();" /></td><td width="185"></form><</td> </tr> <tr><td width="33"></td> <td width="187">Password<sup><font color="#CC0000">*</font></sup></td> <td width="22">:</td> <td width="148"><input name="password" type='text' id='password' /></td><td></td></tr> <tr><td width="33"></td> <td width="187">Re Password<sup><font color="#CC0000">*</font></sup></td> <td width="22">:</td> <td width="148"><input name="repassword" type='text' id='repassword'/></td><td></td></tr> </table></form>
  10. understood ur code.but some doubt ,suppose there are more lines of description for some id(another field,a primary key).Then how will i use this code? eg id description (no of rows) 1 4 rows are there 2 1 row only 3 8 rows
  11. $sql = "select * from product where reference_no = '".$reference_no."'"; $sqlquery = mysql_query($sql); $sql_project_fetch_array =mysql_fetch_array($sqlquery); echo "<table><tr> <td class="tableCellOne"> </td> <td class="tableCellOne">Description</td> <td class="tableCellOne"> <?php echo str_replace("<p>"," ",$sql_project_fetch_array['description']); ?></td> </tr>
  12. I hav a php page which takes data from the db.But the problem i am facing is for a particular fild in database ,i have long data,which i need to b displayed in a wordwrap way eg my data is " Description need a site for school gave order on 12-10-2010 work started on 12-10-2010 " this shuld be displayed as "Description need a site for school gave order on 12-10-2010 work started on 12-10-2010" Description is the field in the database and rest of them are the datas in it
  13. I dont know whether i can post this topic here. I just need a code for creating a login modal window which has the fields username,password,new user and forgot password. thanks in advance
  14. do i need to code this way <form name='usercheck' method="post" action='useravailability.php'> <input name="username" type="text" id="username" value="" maxlength="15" onblur='submit(this.value);'/></td><td width="185"></form>
  15. the problem is in my form i have only one submit button.But before clicking that submmit button i nned a textfield to be submitted when the mouse goes to the second textfield,
  16. I have a webpage in php which contains many fiields.But when i enter data into one particular field(say the first field),i need the form to get submitted and do certain task.How can i achieve this?
  17. thank u for the code.It works well ,if i check more than one checkboxes.But if i check for only one checkbox it gives me errors. what will be the reason? the error is Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/content/77/6911777/html/admin/themes/view_res.php on line 87 Warning: implode() [function.implode]: Invalid arguments passed in /home/content/77/6911777/html/admin/themes/view_res.php on line 87
  18. I have a webpage where all the database items are displyes in a table format.The table also has a check box.Upon clicking the delete button i need to delete all the items whish has the checkbox checked. How will i do that
  19. <form name='registration' action='' method='post' onsubmit="return verify();"> <table width="599" align='center'> <tr><td colspan='5'></td></tr> <tr><td width="33"></td> <td width="187"> User Name <font color="#CC0000">*</font></sup> </td> <td width="22">:</td> <td width="148"> <div> <input name="username" type="text" id="username" value="" maxlength="15" /><span id="msgbox" style="display:none"></span></div></td><td width="185"></td> </tr> <tr><td width="33"></td> <td width="187">Password<sup><font color="#CC0000">*</font></sup></td> <td width="22">:</td> <td width="148"><input name="password" type='text' /></td><td></td></tr> </table></form>
  20. i check the username with database content.So if the username is available or not available i get the message on the left side of the inputbox "Username is available to register".
  21. I am writing a code using jquery in a php page to check the username availabiltiy,but getting error ie every time username is available is the message i am getting. the code is $(document).ready(function() { $("#username").blur(function() { //remove all the class add the messagebox classes and start fading $("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow"); //check the username exists or not from ajax //$.post("themes/user_availability.php",{ username:$(this).val() } ,function(data) $.post("themes/user_availability.php",{username:$(this).val() } ,function(data) { if(data=="no") //if username not avaiable { $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('This User name Already exists').addClass('messageboxerror').fadeTo(900,1); }); } if(data=="yes") { $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('Username available to register').addClass('messageboxok').fadeTo(900,1); }); } }); }); }); php file user_availability.php <?php $login=$_POST['username']; $sql="select username from web_payregister where username='$login'"; $result=mysql_query($sql); if(mysql_num_rows($result)>0){ echo "no"; }else{ echo "yes"; } ?>
  22. <script> function pageScroll() { window.scrollBy(0,1000); </script> </head> <body onLoad="pageScroll();">
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.