Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. Sound like an affiliate marketing thing. You can get product feeds from affiliate networks. Not sure what affiliate networks or if any affiliate network provides a product feed from amazon. I advice you to browse around on the affiliate communities to see if there is information on amazon product feeds. Also it's not really a PHP dependant thing you can pretty much use any programming language to solve your datafeed problem.
  2. <a href="?page=seniors" class="genreseniors" <?php echo(isset($_GET['page'])&& $_GET['page']=='seniors')?'class="highlight"':"" ;?> >link</a>
  3. I reccommend you don't put javascript (unless it's json) in your pages you request via ajax. Try using a oncomplete handler (a handler that waits till the your ajax page gets a response) on the main page instead. Also Onload won't work since your page is already loaded the first time.
  4. You could use a form class to build a form along with the validation. Most php frameworks( such as Zend Framework and CakePHP) include functionality to create forms a lot easier. I do think that having a form with a hundred fields is a bit of an overkill. I mean If I saw a form with a 100 fields I would simply click the back button or some other action to go to another page.
  5. Do you mean you have a table for your events such as: events - id - name - description - date - picture If that is the case why don't simply do a select query to fetch the image name and delete it with that information?
  6. Seeing this: (PHD include gimme one of those please) In that text it looks like your using the php include function. You can't use the include clientside unless you're using ajax. your hyperlink <a href="?page=seniors" class="genreseniors" onclick="newclass1()"> Here it shows that your hyperlink action will load the same page again with url parameters there for the onclick doesn't make much sence. I'm assuming you're using a $_GET to see what to include such as: <?php if($_GET['page']=='seniors'){ include ("seniors.php"); }elseif($_GET['page']=='something else'){ include ("somethingelse.php"); } ?> If the above looks familiar to your code you're better of doing it all in php instead of trying to use javascript to change a css class. Using an onclick event would be pointless in that case since the page simply refreshes and undoing the javascript onclick action. You might want to look up what the difference is between clientside and serverside. Hope it helps.
  7. There has to be some sort of way you have related the images to the events? How for example do you show the images that are related to a certain event? If you don't have any relation what's the point of uploading an image for an event if there is no relation to begin with?
  8. Look into simpleXML also you might want to look into xpath. For examples try a search on this forum or look at the xml tutorial you can find on http://www.phpfreaks.com/tutorial/handling-xml-data
  9. I've seen this before. IE wont allow an html string to be inserted inside a select element where FF does allow that. Two options you have would be to either create the option elements using document.createElement() and inject every option seperately using the appendChild() function. An easier way would be to rebuild the entire select element. The select element on your main page you can wrap inside a div so you can inject the html inside the div <div id="replaceable_select_wrap"> <select> <option></option> </select> </div>
  10. What are you trying to accomplish with this?
  11. nvm that last comment you're using 127.0.0.1 so it wouldn't matter. But in case you were unaware of it, then it could come in handy.
  12. Maybe a long shot but did you setup a dns with the windows host file? usually it's located in C:\Windows\system32\drivers\etc\host
  13. A couple of line breaks would have been nice. In your code I do not see any onchange even for the select element. you can add the even like so: <script> $(document).ready(function(){ console.log('ready'); $("select:[name='quantity']").change(function(){ alert(this.value); }); }); </script> You should be able to finish the rest of the code to get it working.
  14. seventheyejosh is correct about the sql injection part. However in your case your id is probably a number. If that is the case you should make it even more strict by excepting only numbers as input instead of escaping the input.
  15. Just in case you are unaware I'm letting you know. using exec() or system() will run on the server not the client. If you want to see a terminal interface that you can use to enter commands to execute on the server your way is just not gonna cut it. As for the OS mattering. It matters wether the OS of the server is linux, unix windows or whatever OS is out there that runs PHP. For example using exec() on a windows OS means you can run .exe files or .bat files. On a linux server those two wont work.
  16. If you're using the MSI file to install php then somewhere near the start of the installation procedure you'll see a couple of options. fastCGI is one of the options which you don't have. Select either ISAPI or CGI for the installation and it should probably work.
  17. you have have your id and match field the wrong way around change: $res=mysql_query("SELECT * FROM ".TBL_NEWS." WHERE '$news' = newsid"); to: $res=mysql_query("SELECT * FROM ".TBL_NEWS." WHERE newsid={$news}"); You also need to santize your id fetched with the $_GET. Simply never trust user input wether it's with a form or url parameter.
  18. No it would not, but that's ok you need a news item before you can comment it anyway. Is the $id var empty? What are the exact field names of that table?
  19. The following article helped me a lot with that exact issue you're having http://www.sitepoint.com/article/hierarchical-data-database/ The easiest way would be by using a recursive function although it would be inefficient since it would be using a bunch queries. You probably should go with the Tree Traversal option. Personally I use doctrine framework and the NestedSet feature to handle hierarchical data for me but that's only if you're interested in using ORM.
  20. Yup you'd need a different table for that. You can set a relation between them using a foreign key. It would look something like: newscomments - id - news_id (foreign_key) - comment - date Look up some tutorials on normalisation and relational databases for further details if you're interested
  21. Assuming you are using a database. Sounds like a typical case of "pagination".I suggest you look up some tutorials on that subject. You could create a query using the where clause and filtering by id. You can just pass the id in the url and fetch it with the $_GET method. Select * from news where id=69
  22. Define what you mean by "homepage only". And what other pages are you refering to with: Do the images on your "homepage" display correctly though?
  23. if you're using jQuery the following thread might help you. http://www.phpfreaks.com/forums/index.php/topic,260251.0.html
  24. Where is the rest of your html form? It seems to be cut off. And when the togglePage function is being called?
  25. Change the path to your app/webroot directory. try: DocumentRoot "C:\nweev\new_iweev\app\webroot"
×
×
  • 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.