Jump to content

sebastiaandraaisma

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sebastiaandraaisma's Achievements

Member

Member (2/5)

0

Reputation

  1. The solution from Dough boy did not help for error number 2, however, i was able to solve it myself The old code was: $sql="SELECT id,text FROM text_list WHERE id='".$text."' AND (language='".$_SESSION["LANGUAGE"]."' OR language=0) And the new code is: $sql="SELECT id,text FROM text_list WHERE id='".$text."' AND (language='".$_SESSION["LANGUAGE"]."' OR language=1) That solved my problem! Thank you all for helping! Kind regards, Sebastiaan
  2. Thank you Dough boy!!!!! It works! I will try to apply the same code to error located in the @ require in the hope the language error will disappear and than this issue is solved Thank you every one so far. I will now experiment a little on my own (see how far I come) Thanks again!
  3. I used the code from papaface but still get the same error. That probably means I need to change something else. Instead of 318 I tried the value EUR (stands for Euro) but still the same code referring to the line with the code: if (!isset($_SESSION["CURRENCY"])) { $_SESSION["CURRENCY"]=$_POST["currency"]; } The problem is that because I created a direct (static) link no post data is being received. The two parameters that I miss is the currency and language selection. There are 3 @ requires in this script but the first error message happens outside the require and happens I think because it expects to find the currency. The second error happens in one of the @requires and involves the language. O' pasta is ready so I take a break I will try to fix the problem in the @require with the elseif and see what happens I will have
  4. Yes its amazing, I had to spend like 2 weeks telling them which mistakes they had to correct, If you would see how bad they mad my administrator panel.... I asked them if dynamic links would be found by Google, no problem they said. Than I read an article from Google that they have problems with pages containing the & and ? symbols. There response was "Interesting article" did they implement the mod_rewrite? No I had to figure it out myself and with the help of forums of course. It was amazing! Even after reading the first chapter in a book about php for beginners I recognized the mistakes they made regarding security, well they fixed that part for me but I realy had to mail them a lot to get things done. The only good thing out of this is that I have goatherd some basic php experience and have been able to improve some parts The accomplishments of the mod_rewrite took me 6 months but now I know how to deal with it. Yeah it sucks.... If I was rich it would not matter but I'm not Thanks for your support!
  5. Thank you all for your input and such quick response! I did not know the @ was that bad, I can only say that I bought my website for more than 8000 USD and the quality and support that I got from that company sucks so badly that I wish I had bought a ready made solution. At the time I bought it I had no knowledge of php and that sucks because later I saw a much better solution ready made with a lot of comments in source etc, for just 99 USD (which only required some small changes in order to have it the way I wanted) it made me feel sick knowing that I spend a 100 times more for a bad solution. Now I just try to make the best of it now, thats all I can do I'm grateful that there are people here on this forum willing to help people! I would never recommend anyone to use the service of Hyperskins AB in Sweden. Well that said I feel a little better now I will try the code I received from you and experiment a little more after diner (17:09 local time Sweden) Kind regards, Sebas.
  6. Hi I have a problem with my website. The original programmer has left out a default value for 2 variables. This results in 2 "undefined index" errors only when I directly link to the page without having visit the page where the variables are being created first. The website has been made for me without any comments in the script which makes it more difficult for me to analyze. I do know what values I need as a default value. In the page where I need to fix my problem I see: if (!isset($_SESSION["CURRENCY"])) { $_SESSION["CURRENCY"]=$_POST["currency"]; } In the cookie I have on my computer I see the value 318 this is the value that I also want to have a s default. I tried the code: else (isset($_SESSION["CURRENCY"])) { $_SESSION["CURRENCY"]= '318'; } But I than get a parse error on the '{'. Than there is another "undefined index" error which comes from an @require. In this code it says: $sql="SELECT id,text FROM text_list WHERE id='".$text."' AND (language='".$_SESSION["LANGUAGE"]."' OR language=0) ORDER BY language DESC"; $qry=@mysql_query($sql); $row=@mysql_fetch_array($qry); $sql2="SELECT phrase FROM phrases WHERE id='".$text."' AND language='".$_SESSION["LANGUAGE"]."'"; $qry2=@mysql_query($sql2); $row2=@mysql_fetch_array($qry2); return $row2["phrase"]; In this case I'm trying to specify a default value '1'. If someone could point me out I would be very grateful. Kind regards, Sebstiaan
  7. I'm sorry if I offended you. And I now realize that it is someone else who thinks I'm an affiliate of hotscripts. Please feel free to read all my posts and you will see that I actually do try to help people rather than providing a quick solution. http://www.phpfreaks.com/forums/index.php?action=profile;u=43754;sa=showPosts It was absolutely not my intention to withhold someone from learning php. I honestly thought that because he was in a desperate need for a simple site search function and he had limited php experience a solution that had been created by someone and has proven to work well might be a solution to him. In my opinion there is nothing wrong with giving someone a suggestion. But I'm sorry if there has been a miss understanding. I only tried to help and it helps me a lot by looking at working solutions and adapting them to my needs. As far as I know I have only mentioned hotscripts 2 times in all my posts. I'm not an affiliate with them and do not earn any gain by trying to help people on this forum. Even though my experience is limited, I am more than willing to help if I can. Kind regards, Sebastiaan
  8. Your welcome And I'm sorry for sounding harsh. I just figured that it might have been easier to get a ready made code since it was to be a simple search function and you (like me) have limited php experiance. I personally always learn a lot by looking at some one else his code and than change parameters to see what happens. Well anyways it was not my intention to sound harsh it was late (my local time) when I wrote it. Good luck with future programming. Kind regards, Sebas
  9. I will paste the message here that I had privatly send over email, as it might help the absolute beginner to understand the working of php The short answer to your question "how to upload a php file" is through ftp. In case you don't know what ftp is I will explain this to you in short. ftp is a file transfer protocol which basically allows you to upload files from your computer into the computer where you have your website. See for more information about ftp http://en.wikipedia.org/wiki/File_Transfer_Protocol A free ftp program which allows you to upload files (including but not limited to php files) can be found at: http://www.smartftp.com/ However, and here it comes: To run php scripts, your web host (the company where you have your website hosted) needs to have php installed. php is a script that is being executed (controlled) by the server. Java script is being done on the visitors computer. A php page that you see in your browser when you surf is the result of the server. The good news is that almost every web host has php installed. If you upload the php file though ftp on to the server, you do not have to do anything to make it work. Lets say your php file is called test.php and located in the main directory of your website (the directory where your index.html is located) you can simply surf to www.yoursite.com/test.php and the server will process the php file and gives you the result. Try to see php as vegetables, the server as a restaurant, the meal as the resulting php page in your browser and the customer as a visitor of your website. As a customer you request a meal (php web page), the restaurant (server) converts the vegetables (php script) for you into a meal (php page in your browser) and you can enjoy your food. Now a java script cook, would do like this: As a customer you request a meal (html web page) the restaurant (server) gives you the vegetables (java script) and your mother (your computer) will prepare the meal for you. I think that's the best explanation I ever gave to someone about the working of php I hope you understand it a little better now? Kind regards, Sebas.
  10. Wow 5000 bytes? Than I can no longer help you anymore. I'm only able to solve problems that I have experienced myself (I'm not an expert). Well just wait a little, there are so many people here on this forum that know so much more than me that I'm pretty sure you will get it to work! Kind regards, Sebas.
  11. Actualy it did work as you no longer have a blank page (topic solved ) Just kidding. At least your a step further and actually can see what the error says. It seems to me like some variable values are missing but I'm not an expert of course. Do you work with cookies/sessions? Are you going to a page before values over post/get have been transfered? Just a thought. Kind regards, Sebas.
  12. Yes I'm not an affiliate, just trying to help you (for what it's worth it to you). In the early days I used the javascript source a lot, now I use the hotscripts They realy have nice and easy solutions (for free) the quality is sometimes bad , and sometimes goed, but you can look at the ratings. In recent posts I have advised 2 people about hotscripts (one of them was you) feel free to find a better solution. Kind regards, Sebas.
  13. Maybe a stupid question but, do you get timed out maybe? My webhost has a timeout after 3 minutes I have to use the .htaccess to over rule this. Just a thought Kind regards, Sebas
  14. Hi, try www.hotscripts.com its a source with a lot of free ready made solutions including search modules. (No I'm not an affiliate ) Kind regards, Sebas
  15. try www.hotscripts.com a source with free php scripts ready to use. They also have image processing scripts. Kind regards, Sebas
×
×
  • 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.