Jump to content

daxguy

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by daxguy

  1. Hello Everyone I have been looking over the internet for a few hours now. But I could not find solution to my problem. I am having trouble changing the default view of the products being displayed in the shop page. They are like thumbnails, I can change how many of them will appear on a line or on a page. But I want to change the view to list. I want a list of products to appear with the add to cart button. I am sending a link as an example to how i actually want it to be http://abduls.biz/shop/
  2. I am having trouble posting a script using my html form.. If i remove functions like mysql_real_escape_string() or htmlentities() the query execution gives error like characters ' or " are causing problems, I want to post a script with <script>code</script> in the field and want it working on the html page as it is coded on an html page.. Can anyone help? This is the input field Description</b></td><td><textarea name="news_des" cols="50" rows="7"> extracting the information if(!empty($_POST['news_des'])) { $news_des = mysql_real_escape_string(trim(htmlentities($_POST['news_des']))); // to get tags along }else { $error[] = 'You forgot to enter the News Description!'; }
  3. I have a search box which uses multiple query depending on the search criteria the following queries work just fine select * from `car_post` where `approve` = '1' and `caru_city` = '2' select * from `car_post` where `approve` = '1' and `caru_make` = '7' and `caru_city` = '2' These queries mentioned above work just fine.. but i want the results to show the latest entries in the table so write the query as select * from `car_post` where `approve` = '1' and `caru_make` = '7' and `caru_city` = '2' ORDER BY caru_id DESC This query works perfectly fine in the SQL client.. it gives the results there... but as i am using it on my page.. by just adding ORDER BY caru_id DESC The query gives the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESCLIMIT 0, 10' at line 1 I dont understand if the query is working all fine in the sql client directly why isnt it working here?
  4. Thanks for your replies.. i loved the function given out here it works just fine wid me.. what rule should i be using in .htaccess file to rewrite the following link I am able to make seo friendly urls using the functions.. how shud i implement it now on the website http://uaecarmarket....e_car.php?id=57 to http://uaecarmarket....-2007-For-Sale/
  5. I have no clue of working with mode_rewrite().. what should be the rule in the .htaccess file for converting this url to url of my post title i am adding the url here which i want to convert http://uaecarmarket.org/read_news.php?id=30 i want to change this url to my post title.. how shud i do that for instance my post title is present in $post_title? can anyone help
  6. I was wondering how can I create clean urls using PHP. Can someone explain this to me in laymans terms? Here is my current url a element link and how it looks in the browser http://www.example.com/members/1/posts/page.php?aid=123 But I want it to read the pages title. http://www.example.com/members/1/posts/title-of-current-page/
  7. Hello, I have a small issue i am using a facebook login script that allows users to log into the website with there facebook user account. I want to extract information regarding the user and feed it directly to my database like there name, sex, address etc from there facebook account. I am attaching the facebook script that i am using to this post. can any help me or give me suggestions on how to do that? facebook_script.php-5Dec-2012.php
  8. well a nice suggestion the over standing will help me getting my status wheather the employee owes the organisation or not.. the condition u mentioned is all fine as well.. but i want the status to be updated on the end of the month beacause the salaries are issued at the end of the month... plus i want to transfer the remainging amount if negative to the next month status which will than 1st get minus from the basic pay!!
  9. i wanted a way to work out a small task i am into.. i have developed a salary program which manages the salary of employees in my organisation.. the salary program is working all good.. but now i am stuck in a situation.. the salary program works as follows : -the employee is selected during the month if the employee takes any advance his amount on the that specific date is added to the db -an employee can take advance salary before the 30th of the month on his need which is added to the db - i have a created a script that shows all the advances of the employee selected during the month and subtracts the advances from the basic pay and shows the result.. eg : employee david basic salary 5000$.. total advance 2750$ remaing sal basic-advance Now the problem i am in is that some times the advance increase from the basic pay.. which is allowed in certain situation.. than the remaining amount is in minus like advance 6000 and basic pay is 4000 soo -2000 is remaing.. i want the negative amount to automatically be forwarded in the next month advance on every 30th of the month.. soo that i can manage the advance salaries properly.. does any one have a good suggestion?
  10. the script on the link you sent me prints the complete webpage all i want is the table to be printed avoiding the stuff like the header, sidebar foot etc.. just the resulting table should be printed
  11. I have a salary system made using php and html.. in which i calculate the monthly salary of my employees.. as a result i get a table on which the salary are displayed.. all i wanted to know how can i add print button with the table and print that table? is there a good solution for this in php?
  12. Thanx alot it works.. but i do not get how the logic works.. would you mind explaining it a bit?
  13. i have the folowing code.. <select name="month"> <?php for($i=1; $i<=12; $i++) { echo "<option value='$i'>$i</option>"; } ?> </select> in the above code what is happening is a simple display of 1 to 12 months in a drop menu.. i am using the date function to get the month date('m'); what i want is that the drop down should automatically focus on month 7 as this is the 7th month.. The selection of the month from the drop down should automatically move to the current month.. and if the user wants to change the month he can change the month he wants to.. right now it displays a list focussing on 1 as 1 is the starting value in the loop.. i hope you understand. i am attaching a thumbnail of what i have in the results.. all i want is 1 to be changed by the current month with the other digits being displayed on drop down! [attachment deleted by admin]
  14. I wanted to know in my page how can i change link colors of specific links.. like the links appearing on the top section as green.. the down secction blue.. or sumthing.. can we do that using any technique? i dont want to keep a single color for the links in the complete webpage?
  15. I am trying to find a character in the follwing string $string = ' Mumbai Mast Kallander - 02 - Mumbai Mast Kallander'; the character i want to find is '-' and the find how many times does it occur in the string.. can anyone help?
  16. Thanks for all your help
  17. no i want a script that runs on mywebspace nd read from my hard drive is that possible?
  18. NO i am not trying to access the webspace folder.. i am trying to access the folder from my PC.. like the path i mentioned in my 1st post.. like my site is http://mysite.php/access_folder.php is were the script is.. i want to read a folder in my C drive of my PC.. C:/xampp/xtrajam .. i want the contents of this folder to be displayed not the folder on the webspace
  19. here is the info that i have found by the procedure u told me.. what should i do with this _SERVER["DOCUMENT_ROOT"] /var/chroot/home/content/36/6817636/html
  20. umm i didnt get wat u mean?
  21. I have a script.. it works fine on my localhost.. now i am trying to work it with on my remote server.. the script reads the folder in my c drive and shows me the file on display here is the code <?php $main_dir ="C:\\xampp\\htdocs\\xtrajam"; $main_open = opendir($main_dir); while(($main_file = readdir($main_open)) != FALSE) { echo $main_file."<br />"; } closedir($main_open); ?> Now the thing is this works fine on local host as it can easy access the path C:\\xampp\\htdocs\\xtrajam Now i want this path to be accessed sumhow wen i try it on my remote server.. how should i do that like when i run the script online it reads the contents from my c drive directory..? is it sumhow possible?
  22. well another stupid issue.. well i have written the code to rename sum .mp3 files from the folder.. the folder is accessed i can read the files.. now i wanted to rename them.. like the songs are were are you - aliance.mp3 i am trying to explode the file name with symbol '-' as i just want the title of the song not the artist.. $dir = "C:\\xampp\\htdocs\\music"; $file_open = opendir($dir); $count = 1; while(($file = readdir($file_open)) !== FALSE) { $title = $file; $symbol = '-'; $pos = strpos($title, $symbol); if($pos == true) { $refined_title = explode($file, '-'); $success = rename($dir."\\".$file, $dir."\\".$refined_title[0] .".mp3"); if($success) { echo "Your files have been renamed!!"; } else { echo "Could Not Rename the files!!"; } } } closedir($file_open); The result i get is the songs get renamed but just with .mp3 nd get over written cuz all the songs get the same name.. the problem is that i cannot get the name of the file after exploding it.. the refined_title[0] is empty.. the explode aint working on this.. any oder solutions guys?
  23. Thanks alot Pikachu2000 u are a life saver.. it was the backslashes that wer creating problems..!!
  24. I was trying to access my files in a folder i have to further manipulate them but i am havin the following error Warning: opendir(C: mpp\htdocs\j) [function.opendir]: failed to open dir: No such file or directory in C:\xampp\htdocs\re_name.php on line 3 Warning: readdir() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\re_name.php on line 5 filename : ( and the loop keeps on rolling down) my code is $dir = "C:\xampp\htdocs\j"; $file_open = opendir($dir); while(($file = readdir($file_open)) !== FALSE) { echo "filename : ".$file."<br />"; } closedir($file_open); i do not understand wer am i creating the mistake!!
  25. Hello Everyone.. I have a different sort of a question here.. I was looking if its possible to check the no. of files in a folder (wheather they be in any format) and if thts possible can i manupulate those files like renaming them.. like for instance i have 1000 files in a folder nd i wanna rename them all according to sum criteria.. like if there are 300 mp3 songs in a folder.. 1st i wanna do i check how many are in the folder exactly.. then i wanna rename each song cuz they have sum extra information of artist on the file name.. like hello darling (alize).mp3 i wanna rename them to hello darling.mp3.. nd i wanna do the same to all the files in that folder.. is der a way i can make this possible..? 1st check the total no. of files in a folder.. renaming each file according using a special symbol.. like if "(" symbol cums up it can explode the name.. nd we can have the correct name in title[0] nd the (alize).mp3 part in title[1]. we can just join title[0].mp3 to get the correct name out of each file..!! i hope u understand wat i need to doo!! wud be thankfull if anyone can help
×
×
  • 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.