Jump to content

wemustdesign

Members
  • Posts

    106
  • Joined

  • Last visited

    Never

Everything posted by wemustdesign

  1. I have a table, each row has a date. I am wanting the query all of the results before or equal to todays date. I have tried the following but doesn't seem to work. $todaysDate= date("Y-m-d"); $Coursesql = "SELECT * FROM courseDates WHERE date <= '$todaysDate'";
  2. I don't have a seperator at the moment, each variable is on a new line. I think it may be easier to include a seperator (such as |) thinking about it, I wasn't sure if you could some how distinguish a new line in a mysql field in php
  3. Sorry I don't think I was clear enough. The variables are not in seperate rows, they are in 1 field within a single row
  4. I have some text in a database table. Each point has a new line: oranges lemons When I output this is want to make them into a list so they will output like <li>oranges</li> <li>lemons</li> How would I warap these variables in the <li> when outputted from the database?
  5. I am using the Paypal ipn to add bought products to my database. So I have posted my products to Pyapl fine. I am having trouble getting the variables dy7namically in the IPN. I can do it manually fine like this: $item_number1 = $_POST['item_number1']; $item_number2 = $_POST['item_number2']; .................... I need to dynamically create the above. I thought the while loop below would work but I am not sure if this is how you would do this, or if I have the correct syntax: $dc=1; while($dc <= $num_cart_items){ echo "$item_number$dc = $_POST['item_number$dc']"; $dc++;
  6. Just need a little advice on the best way to do this - I have created a datebase to organise courses. First I have created a table CourseType, this holds the name and other details of the course. Table CourseType id, name, outcomes, skill levels - Next I have created CourseDates. This will hold the dates of the course. Table CourseDates id, CourseType, location, places Next is where I am not sure. I now need to enter which students are on the course (I have already set up a table for students). Would it be best to enter the students participating on the course in the CourseDates table? This would have to be done using implode with the students username like: 12 | 22 | 17 or would it be best to set up a seperate tabe like: Table Courses id, syudentID, CourseType Any advice on best practice would be appreciated.
  7. I have created a custom shopping cart. I have sent the multiple products to paypal. What I don't know how to do is send multiple items to the Paypal IPN. I am using the code below to get the details for the item. How do I get the item_names and item_numbers for all of the items ordered? $item_name = $_POST['item_name_1']; $item_number = $_POST['item_number_1'];
  8. well this is what I am using but I am getting an error from paypal saying theres nothing in my cart. Is it my code? <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="upload" value="1"> <input type="hidden" name="business" value="payment@mysite.co.uk"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="item_number1" value="item number"> <input type="hidden" name="item_name1" value="Item Name"> <input type="hidden" name="amount1" value="20"> <input type="hidden" name="item_number2" value="item number"> <input type="hidden" name="item_name2" value="Item Name"> <input type="hidden" name="amount2" value="20"> <input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>
  9. I am creating a site using Paypal IPN. I have searched the net but can't find much on multiple items. How do I send multiple items to Paypal rather than just the total for products bought?
  10. yeah I had tried with / and without that but doesn't solve it
  11. I have wrote a rewrite rule to get my url as short as possible. The first section works but the second doesn't. Any suggestions appreciated: -------------------------------------------------------------------------------------- url: index.php?uk=newcastle outputs fine as: /newcastle/ using rewrite rule: RewriteRule ^([^/\.]+)/?$ index.php?uk=$1 [L] -------------------------------------------------------------------------------------- I cannot get the second rule to work. I don't know if I have an error inb my code or if it is not possible to shrink the rule so much. The url: index.php?uk=newcastle&type=small this is what I want to work: /newcastle/small this is the rule but doesn't work RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?uk=$1&type=$2 [L] --------------------------------------------------------------------------------------
  12. Great that exactly what I need to know. Have been up and rewrite but is not very clear
  13. I know a little about creating mod rewrite. I successfully outputted the following: ?page=about > /page/about/ RewriteRule uk/([^/\.]+)/ ?$ ?page=$1 But what do you do if there is a possibility of more query strings. Would this all be writted within the same rule? ?page=about&content=3 ?page=about&content=3&style=1
  14. Does anyone know of a lightbox that will allow php files to be displayed in it. I found facebox which is close (allows the insertation of html file) but can't find one that allow php scrips inside it. Here is facebox http://famspam.com/facebox
  15. Hi, I am just wanting to load some variables from a text file. My text file looks like: myContent = This is some example content How can I echo myContent in PHP? Cheers
  16. I am currently doing a small script for a company that doesn't have mySql support on there hosting. How would I connect to the database on my hosting account? Currently I am using the following but have tried http://www.mysite.com $database['host'] = localhost;
  17. if you offer image consultancy I would suggest adding more images to your own site
  18. I am looking for a image slider but cvannot find one. Was jujst wanting to know if anyone has seen a free/ commercial script that works the same as this: The image on the front page changes as you scroll over the buttons. If you wait long enough it auto scrolls: http://www.chaptereight.com/ Thanks
  19. I can't seem to figure out what the problem is here. All I want to do is align 2 divs next to each other. I am using relative positioning as float was causing problems. The 2nd div always aligns with the bottom of the first div. You can see what I mean here: http://www.the-photography-studio.co.uk/test.php Here is my code <div id="main_wm"> <div class="mainleft_rev"> <br /> <br /> <br /> <br /> <br /> <br /> <br /> </div> <!--end mainleft--> <div class="mainright_rev"> This is test content <br /> <br /> <br /> <br /> <br /> <br /> <br /> </div><!--main_right_rev--> </div><!--main_wm--> CSS: #main_wm {width:100%; background-color:#0066FF; background-image:url(images/bg_left.jpg); background-position:left; background-repeat:repeat-y;} .mainleft_rev{width:200px; min-height:180px; position:relative; top:0; height:auto !important; height:180px; background-color:#00CC00;} .mainright_rev{width:400px; min-height:180px; position:relative; top:0; left:200px; height:auto !important; height:180px; clear:both; background-color:#00CC00;}
  20. The error may be in your form. Can you post the code for this
  21. I am trying to add 'Get Directions to Here' in my info window in Google Maps. I have followed sample code but don't really know what I am doing. This is the code I am using at the moment, this simply centers the map, creates an info window and displays some text. Can anybody point me in the right direction of what I have to do next? <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(54.988764 , -1.436700), 17); map.openInfoWindow(map.getCenter(), document.createTextNode("Get directions here")); map.setMapType(G_HYBRID_MAP); map.setUIToDefault(); var point = new GLatLng(54.988764 , -1.436700); map.addOverlay(new GMarker(point)); } } </script>
  22. I have 2 questions about using google maps if anyone can help. 1. First of all I am wanting to know how to add a new line of text to the info box on my map 2. I am wanting to know how to add 'Get directions' on the info box. I am using this code to create my map and add the infobox: <script type="text/javascript"> function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(54.988764 , -1.436700), 17); map.openInfoWindow(map.getCenter(), document.createTextNode("Get directions here")); map.setMapType(G_HYBRID_MAP); map.setUIToDefault(); var point = new GLatLng(54.988764 , -1.436700); map.addOverlay(new GMarker(point)); } } </script>
  23. Cheers Mark worked a treat, like your little WHERE 1=1 trick would never have thought of doing that. Cheers
  24. Superb thanks for your help, have been pulling my hair out tring to get this to work. Gonna try this now. Thanks again!
  25. Yes I am already using this method to retrieve the variables. The problem I am having is executing the appropriate query depending on what query string is passed. for example if $region and $city or passed query 1 will execute $region and $county are passed query 2 will execute and so on, if you get what I mean
×
×
  • 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.