Jump to content

sudhakararaog

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sudhakararaog's Achievements

Member

Member (2/5)

0

Reputation

  1. i would like to display statistics information and show this on a map with multiple markers i have initially created for a single marker the example is at http://www.sudhakargolakaram.co.in/files/stats.php for this i have written the following in the php file echo (' <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script src="maps api key"></script> <script src="jquery.googlemaps1.01.js"></script> '); $lat="-36.847385"; $lon="174.765735"; echo(' <script type="text/javascript"> $(document).ready(function() { $("#map_canvas").googleMaps({ markers: { latitude: '); echo $lat; echo(', longitude: '); echo $lon; echo(' } }); }); </script> '); ?> this is working fine however i would like to get the values of the latitude and longitude values from mysql using select query and pass the values of latitude and longitude to the javascript code using a while loop the code to display multiple markers is <script type="text/javascript"> $(document).ready(function() { $('#map_canvas').googleMaps({ markers: [{ latitude: 37.4416, longitude: -122.1516 },{ latitude: 37.4516, longitude: -122.1616 },{ latitude: 37.4566, longitude: -122.1666 }] }); }); </script> this multiple markers is quite different to single marker as this does not have },{ for the last marker in terms of the syntax of the php code how can i write the php code so that i will get the output in the browser as mentioned above for multiple markers thanks
  2. please refer to http://sudhakargolakaram.co.in/verticallist.html my question is about the width of the link for each of the list items the list items have different words so the width of the words are different, when the mouse moves on individual links the hyperlink cursor appears based on the length of each link, for this i have given #list1 ul li a { padding: 10px 0 20px 0; } however this is being ignored and #list1 ul li { padding: 10px 0 20px 0; } is being interpretted, in this case since i have links in the list items i guess #list1 ul li a{} should be interpretted correct or is #list1 ul li {} only interpretted, ultimately what i want is the hyperlink cursor should appear based on the width of an individual link please advice thanks
  3. i would like to import a csv file into the database so that i do not have to manually make entries when using a cms initially i selected the database and then the table into which i want to add new data and exported as csv file and then added deleted all the entries in this file and added 1 new entry following the format in the csv file that i exported when i import this csv file i keep getting the error Invalid field count in CSV input on line 1. while importing the csv file i have changed Fields terminated by from ; to , what is the correct procedure so that i dont get this error also when exporting as csv file should i select the Put fields names in the first row option and there are other options as well, how should i go about so that i dont get the error when importing also if i select the sql option and then delete the entries and make a new entry and if i import this file i get the error #1062 - Duplicate entry '1' for key 'PRIMARY' before importing i have selected the database and selected the table into which i want to import the csv or sql file also before importing the files i suppose i have to make sure that the file i import is the same name as the table whether i import a csv or sql file please advice how to go about for csv and sql format also i guess the procedure for csv format can be followed for an Microsoft Excell 2000 and CSV for MS Excel i guess
  4. hi i have read somewhere where in when mysql database is accessed from cpanel normally the page redirects to the phpmyadmin page however if a line of code is added to some php file there will be an alert asking to enter username and password in order to access phpmyadmin for security, can anyone tell me which php file that is and also the code that is needed. thanks
  5. hi i am using a cms which requires mod_rewrite to be enabled for seo urls in the wamp that i use in my local machine in the httpd.conf file i have this line and removed the comment LoadModule rewrite_module modules/mod_rewrite.so when i view the phpinfo i can see that mod_rewrite is on in the Loaded Modules i am guessing that my hosting might not allow to edit the httpd.conf file so i tried adding the following to the .htaccess which is in the root directory Options +FollowSymLinks RewriteEngine On RewriteBase / and uploaded the .htaccess file and when i viewed the phpinfo i do not see mod_rewrite for my webserver also on my server i would be installing the cms in a separate folder after the root directory, so i guess the .htaccess file should be Options +FollowSymLinks RewriteEngine On RewriteBase /foldername how do i go about enabling mod_rewrite in the .htaccess file as i might not be able to edit httpd.conf please advice. thanks
  6. hi i am using windows vista and installed wamp server, initially i installed wamp and accessed phpmyadmin and while setting a password for the root i did a mistake and could not access phpmyadmin and also renamed some php files so i uninstalled wamp server and re installed now the problem i am facing is when i click on mysql.exe located at D:\wamp\bin\mysql\mysql5.1.36\bin i am getting the following error error 2003 cant connect to Mysql server on localhost 10061 in config.inc.php located at d:\wamp\apps\phpmyadmin3.2.0.1 i have the following $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'root'; $cfg['Servers'][$i]['AllowNoPassword'] = true; along with others. when i type http://localhost i am able to see the welcome screen of wamp and can click on phpinfo but when i click on phpmyadmin it takes a while to load and a blank screen appears also i have stopped all services and restarted all services from the wampserver icon in the system tray, normally the colors change from red to yellow to white, the color is at yellow and does not change to white how do i solve the error error 2003 cant connect to Mysql server on localhost 10061 so that i can use phpmyadmin please advice. thanks.
  7. initially i used a repeating background using css by specifying repeat-x for a div that holds the background image, when i tested this by sending an email using php i noticed that when i clicked view images in gmail i am able to see all the images i used as <img> tag specifying its absolute path, but not repeating background using css so i tried using the repeating background inside a <td> which repeated fine when i access the page on my local machine and from a server, however when i used it for the email example , even with <td> tag gmail is not able to repeat the background image, i would image this would be the case with other email clients as well, is there any workaround for repeating backgrounds either as repeat-x or repeat-y for email clients in this case when sending an email from a php file thanks
  8. <?php $headers = "Content-type: text/html; charset=iso-8859-1"; $to="myemailaddress"; $subject="Email Newsletter"; $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Email Newsletter</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="wrapper"> <div id="topmenu"> </div> <div id="content"> <div class="leftcolumn"> </div> <div class="rightcolumn"> </div> </div> <div id="footer"> </div> </div> </body> </html>'; if(! mail($to, $subject, $message, $headers)){ echo "There was an error is sending the email"; } else{ echo "The email has been sent"; } ?> hi my question is about send an email with php like a newsletter, when we read a newsletter email its similar to a webpage which contains content, images, css and other elements i created a static webpage initially with html css and images folder after creating the page i wanted to test to see how it would look if i were to send this as an email like a newsletter. so i have created a php file with $headers = "Content-type: text/html; charset=iso-8859-1"; $to="myemailaddress"; $subject="Email Newsletter"; and $message as mentioned above has the entire html code as i used it in my static html page i also copied the style.css in the server and created images folder and copied all the images i used in my static page to the server. i created a separate folder in my webserver called newsletter and copied the php file, css file and images folder with the images i used when i accessed the index.php as http://website.com/emailnewsletter i am getting a message that The email has been sent and i am getting the email however my question is when i open this email the styles and images are not being applied and i see only the text in the static page i created. can someone let me know how i can fix this so that when i open the email it would look like the static page i created with all the styles applies and images displayed is this only possible by using specialized email softwares or can it be done by php as well with the logic used. any help will be appreciated. thanks
  9. i am using smarty template engine at work place, following is the situation i already have 1 template that has already been created example = http://localhost/sites/template1.com this works fine following is the folder structure i have for smarty on xampp 1. C:\xampp\htdocs\sites\template1.com where i have .htaccess index.php and siteconf.php 2. C:\xampp\htdocs\sites\_templates\templates\template1 in the siteconf.php file there are all the major variables defined which are accessed in other tpl file of the templates example in aboutus page, contactus page etc of this template1 now i have created another template called template2 and this also has the same structure 1. C:\xampp\htdocs\sites\template2.com where i have .htaccess index.php and siteconf.php 2. C:\xampp\htdocs\sites\_templates\templates\template2 my question is the look and feel when i access http://localhost/sites/template1.com and http://localhost/sites/template2.com is the same the only thing that needs to be done is for template2 when i access http://localhost/sites/template2.com ONLY the header image should be different compared to the header i have for http://localhost/sites/template1.com this is the only change i need i am not aware as to the php code i need to write so that when i access http://localhost/sites/template2.com the header image changes and this new header image remains for the entire pages of http://localhost/sites/template2.com presently in header.tpl of template1 is written as follows {if strpos($Data.KEYWORD,"rv rental") === false} <div class="header" style="background:url(images/header_{$siteData.COUNTRY3}.gif) no-repeat top left;"> {else} <div class="header" style="background:url(images/header_{$siteData.COUNTRY3}_rv.gif) no-repeat top left;"> {/if} </div> so i need to change the {if} {else} where i need to mention that if i am accessing http://localhost/sites/template2.com then the header image should be different. any help will be greatly appreciated. please advice. thanks.
  10. thanks for replying when i use {literal} <style type="text/css"> body{ font: normal 12px Arial, Helvetica, sans-serif; } #wrapper{ width: 900px; margin: 0 auto; } </style> {/literal} this is working however if i use {literal} <link rel="stylesheet" href="/style1.css" type="text/css" /> {/literal} the css file is not being called, also i tried <link rel="stylesheet" href="c:/wamp/www/templates/template1/style1.css" type="text/css" /> the full path as with other smarty functions i had to give the entire path, even this is not working how can i call the css file without writting {literal} <style type="text/css"> body{ font: normal 12px Arial, Helvetica, sans-serif; } </style> {/literal} as the code will increase in the page also $smarty->compile_check = true; is already set in my index.php file please advice thanks
  11. in the index.tpl file which i access as http://localhost i am able to add the doctype and other tags <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>{$pagetitle}</title> </head> <body> vale of smarty variable is {$var1} </body> </html> all this works fine however when i add a link tag to call a css file as <link rel="stylesheet" href="style.css" type="text/css" /> the code for css is * { margin: 0; padding: 0; } body { font: normal 12px Arial, Helvetica, sans-serif; margin: 0; padding: 0; } this css style is not being applied to the index.tpl when i access the page as http://localhost how can i call the css file from index.tpl also if i am using a jquery plugin i need to use a script tag to call the javascript files, how do i call these javascript file from index.tpl file please advice. thanks
  12. i have 3 template folders called template1 template2 and template3 in the index.php file when i use the following and access http://localhost everything works fine and i am able to display the value of variables defined in index.php $smarty->template_dir = 'c:/wamp/www/smarty/templates'; however when i change to $smarty->template_dir = 'c:/wamp/www/smarty/templates/template1'; or $smarty->template_dir = 'c:/wamp/www/smarty/templates/template2'; or $smarty->template_dir = 'c:/wamp/www/smarty/templates/template3'; and when i access http://localhost i am getting the output of $smarty->template_dir = 'c:/wamp/www/smarty/templates'; where as i have made a small chane in the index.tpl for template1,2and 3 a simple line = template 1 and then followed by displaying the value of variables why am i getting the output of $smarty->template_dir = 'c:/wamp/www/smarty/templates/templates'; when i am changing the $smarty to $smarty->template_dir = 'c:/wamp/www/smarty/templates/template1'; i have cleared the cache and also tried http://localhost?clearcache=1 and http://localhost?clearall=1 however i still see the output of $smarty->template_dir = 'c:/wamp/www/smarty/templates/templates'; please advice. thanks.
  13. i have installed wamp on my computer and when i access phpmyadmin i get the following error #1045 - Access denied for user 'root'@'localhost' (using password: NO) i already have xampp installed on my computer, i want to learn smarty templates so i am using wamp for the sake of learning smarty, i do not want to install smarty on xampp as it is already configured with other settings so i would like to use wamp i am using windows xp service pack 2 i have chaned the port to 81 in the httpd.conf configuration file of wamp and changed server name to localhost:81 so i access wamp as http://localhost:81 this works fine, from this page when i click on phpmyadmin link i get the error #1045 - Access denied for user 'root'@'localhost' (using password: NO) i have followed the steps from the following links http://www.wampserver.com/phorum/read.php?2,30300 http://forums.macosxhints.com/showthread.php?t=58057 i have tried stopping all services and restarted wamp service however i am not able to access phpmyadmin but i am able to access wamp as http://localhost:81 and any files i create in the wamp/www folder please advice. thanks
×
×
  • 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.