Jump to content

vinpkl

Members
  • Posts

    448
  • Joined

  • Last visited

Everything posted by vinpkl

  1. hi thorpe thanks. its works perfect. can u make this line little simple. like i want to add a new blank row after every row to give some spacing. where should i add. echo (($i % 2) ? "<td width='100%' id='white'>" : "<td width='100%' id='grey'>") . $testimonial . "</td>"; vineet
  2. hi all i need to make my every alternative row means 2nd 4th 6th 8th result row background grey. I using the below loop which displays the result. but how can i make rows background different. <?php $qry="select * from testimonials"; $result=mysql_query($qry); while($row = mysql_fetch_array($result)) { $testimonial=$row['testimonial']; echo "<table>"; echo "<tr>"; echo "<td width=100%>". $testimonial . "</td>"; echo "</tr>"; echo "</table>"; } ?> vineet
  3. hi PFM I wanted to edit this code but the forum said that you limit exceeded. so here is what i found. This was also part of code. If i write this line <script language="javascript" type="text/javascript"> window.top.window.stopUpload(<?php echo $result; ?>); </script> then i receive error otherwise not. do IE7 doesnt recognise window vineet
  4. hi PFM i need a little help. i m using the script from the url that u gave <script language="javascript" type="text/javascript"> function startUpload(){ document.getElementById('f1_upload_process').style.visibility = 'visible'; document.getElementById('f1_upload_form').style.visibility = 'hidden'; return true; } function stopUpload(success){ var result = ''; if (success == 1){ result = '<span class="msg">The file was uploaded successfully!</span>'; } else { result = '<span class="emsg">There was an error. !</span>'; } document.getElementById('f1_upload_process').style.visibility = 'hidden'; document.getElementById('f1_upload_form').innerHTML = result; document.getElementById('f1_upload_form').style.visibility = 'visible'; return true; } </script> This code give me error "object expected on line 23" in status bar in IE7. I dont get any error in Firefox or opera. do i need to change anything acording to Internet Explorer. Or how switch off this error. This is the line where i get error document.getElementById('f1_upload_process').style.visibility = 'hidden'; vineet
  5. hi PFM thanks. i got the idea from there. vineet
  6. hi gevan that is also good idea. but how will the div know that the image has been uploaded and it can become hidden again. vineet
  7. hi xtopolis thanks. it worked great vineet
  8. hi all i have a form that uploads the image. Till the file get uploaded i want to show an uploading animated icon adjacent to input type file field to show user that the uploading is in progress. when uploading finishes it should disappear. i dont want to go for progress bar as its not an easy task. <?php require_once("../config.php"); $msg=""; if(isset($_REQUEST['submit'])) { $loc=$_REQUEST['banner_loc']; $path=$_FILES['banner_image']['name']; move_uploaded_file($_FILES['banner_image']['tmp_name'], "../graphics/" . $_FILES['banner_image']['name']); $qry="insert into banners_homepage(location,banner_image) values('$loc', '$path')"; if(mysql_query($qry)) $msg="Banner Inserted successfully"; else $msg="Error Inserting Banner"; } ?> <input type="file" name="banner_image" id="banner_image" size="60" /> vineet
  9. hi all i m using the below script to check live check user in database. This script works fine for me. I just need to have the same effect when the user enters the username and his cursor is still in the input box. At present to show mesage whether the username exists or not the customer has to enter the username and then put the cursor in the next input field. <script type="text/javascript"> function toggle_username(userid) { if (window.XMLHttpRequest) { http = new XMLHttpRequest(); } else if (window.ActiveXObject) { http = new ActiveXObject("Microsoft.XMLHTTP"); } handle = document.getElementById(userid); var url = 'ajax.php?'; if(handle.value.length > 0) { var fullurl = url + 'do=check_username_exists&username=' + encodeURIComponent(handle.value); http.open("GET", fullurl, true); http.send(null); http.onreadystatechange = statechange_username; }else{ document.getElementById('username_exists').innerHTML = ''; } } function statechange_username() { if (http.readyState == 4) { var xmlObj = http.responseXML; var html = xmlObj.getElementsByTagName('result').item(0).firstChild.data; document.getElementById('username_exists').innerHTML = html; } } </script> <input id="username" type="text" name="username" onchange="toggle_username('username')" /><br /> <div id="username_exists" style="font-size: 11px;font-weight: bold;color:#FF3300"> </div> vineet
  10. hi dropfaith it means that i can use dynamicaly generated titles with no worries. and the same goes for the content also. we dont need to insert static content in our dynamic pages to get them indexed. vineet
  11. hi all my pages title are coming dynamically on the click of the link. The title is not written manually. Its dynamic like <title><?php echo $dealer_name ." ". $ct_name . "USA" ?></title> so my question is that google and yahoo crawlers will crawl the title when the page link is clicked and the title outputs the actual name not the variable name. because if crawlers crawl the page title when the page is on server but not opened in any browser then the my page title will consist of only variable names and those mean nothing to crawler. vineet
  12. hi thorpe i wil keep these things in mind and wil search on it more. vineet
  13. hi corbin like u said u have used fedora and ubuntu. so what diference do u find between them vineet
  14. hi all i m present at shared hosting and want to move to vps hosting. My server vps hosting provides me with different operating systems as under 1) Centos 2) debian 3) fedora 4) gentoo linux 5) opensuse 6) slackware linux 7) ubuntu i would like to what all difference these operating systems have and what all impact will i have on my php scripting files. will i have to create my php mysql website again according to operating system i choose. vineet
  15. hi MatthewJ thanks a lot. solved vineet
  16. hi all i am generating a url dynamically in which <?php $cname= "Mobile Phones" ?> in the url i get Mobile%20Phones How can i replace %20 in it with - hyphen sign i have tried <?php $cname= "Mobile%20Phones" echo str_replace($cname,"%20","-"); ?> not able to get it work. how can i make it echo "Mobile-Phones" vineet
  17. hi premiso i moved the chmod line before the move_upload file portion. still get the same error. Warning: chmod() [function.chmod]: Operation not permitted in /home/gadgetso/public_html/admin/add_special_offer.php on line 10 Warning: move_uploaded_file(../graphics/lg_logo.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/gadgetso/public_html/admin/add_special_offer.php on line 11 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpMr5bY8' to '../graphics/lg_logo.gif' in /home/gadgetso/public_html/admin/add_special_offer.php on line 11 <?php require_once("../config.php"); if(!isset($_SESSION['ADMIN_ACCESS'])) header("Location:index.php"); $msg=""; if(isset($_REQUEST['submit'])) { $loc=$_REQUEST['offer_loc']; $path=$_FILES['offer_image']['name']; chmod("../graphics/", 0777); move_uploaded_file($_FILES['offer_image']['tmp_name'], "../graphics/" . $_FILES['offer_image']['name']); $qry="insert into special_offers(location,offer_image) values('$loc', '$path')"; if(mysql_query($qry)) $msg="Offer Inserted successfully"; else $msg="Error Inserting Offer"; } ?> vineet
  18. hi premiso i found chmod() and used it and getting the error. Warning: move_uploaded_file(../graphics/bank_logo.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/gads/public_html/admin/add_special_offer.php on line 12 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpksAvdQ' to '../graphics/bank_logo.gif' in /home/gads/public_html/admin/add_special_offer.php on line 12 Warning: chmod() [function.chmod]: Operation not permitted in /home/gads/public_html/admin/add_special_offer.php on line 13 <?php require_once("../config.php"); if(!isset($_SESSION['ADMIN_ACCESS'])) header("Location:index.php"); $msg=""; if(isset($_REQUEST['submit'])) { $loc=$_REQUEST['offer_loc']; $path=$_FILES['offer_image']['name']; move_uploaded_file($_FILES['offer_image']['tmp_name'], "../graphics/" . $_FILES['offer_image']['name']); chmod("../graphics/",0777); $qry="insert into special_offers(location,offer_image) values('$loc', '$path')"; if(mysql_query($qry)) $msg="Offer Inserted successfully"; else $msg="Error Inserting Offer"; } ?> vineet
  19. hi premiso yes i m on shared hosting and i dont want to take risk. if you have used chmod() in your projects then can u explain how to use. here is my code <?php require_once("../config.php"); $msg=""; if(isset($_REQUEST['submit'])) { $loc=$_REQUEST['offer_loc']; $path=$_FILES['offer_image']['name']; move_uploaded_file($_FILES['offer_image']['tmp_name'], "../graphics/" . $_FILES['offer_image']['name']); $qry="insert into special_offers(location,offer_image) values('$loc', '$path')"; if(mysql_query($qry)) $msg="Offer Inserted successfully"; else $msg="Error Inserting Offer"; } ?> vineet
  20. hi premiso before changing the permission i would like to ask that is it a secure solution. will changing the permission harm my mywebsite server security. vineet
  21. hi premiso so i download smartftp if it has free version. vineet
  22. hi premiso i m using ws ftp. when i right click my folder i dont get properties option there. there are these below options change folder make folder delete folder transfer folder rename folder chmod(unix) refresh list folder list so do i need to use anyother ftp software vineet
  23. hi ram i have tested this on my testing server that is xampp and its working fine. i m getting this error when i m testing online on linux server. so what to do. vineet
  24. hi i dont know what is chmod and how to set it to 777. please clarify vineet
  25. hi all i am uploading an image and getting the below error Warning: move_uploaded_file(../graphics/home_bigad2.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/gads/public_html/vineet/adminpaji/add_special_offer.php on line 12 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpXjKkp7' to '../graphics/home_bigad2.jpg' in /home/gads/public_html/vineet/adminpaji/add_special_offer.php on line 12 This is my php code <?php require_once("../config.php"); $msg=""; if(isset($_REQUEST['submit'])) { $loc=$_REQUEST['offer_loc']; $path=$_FILES['offer_image']['name']; move_uploaded_file($_FILES['offer_image']['tmp_name'], "../graphics/" . $_FILES['offer_image']['name']); $qry="insert into special_offers(location,offer_image) values('$loc', '$path')"; if(mysql_query($qry)) $msg="Offer Inserted successfully"; else $msg="Error Inserting Offer"; } ?> vineet
×
×
  • 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.