User Profile

Collapse

Profile Sidebar

Collapse
adamjblakey
adamjblakey
Last Activity: Feb 24 '15, 03:06 PM
Joined: Jan 31 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • adamjblakey
    started a topic Coupon Code JS Simple Cart

    Coupon Code JS Simple Cart

    Hi,

    I am trying to add this to my website which is a promo code script which connects to JS simple cart but doesn't seem to be working and does not even create an action like the JS is being triggered. Can anyone see why this is not running the function?

    Code:
    <div class="cartRow" id="promoCodeDiv">Promo Code: <input type="text" id="code" name="code"><button
    ...
    See more | Go to post

  • adamjblakey
    started a topic PHP in XML File
    in PHP

    PHP in XML File

    Hi,

    I have a script below which has been working fine however i have just moved server and rather than showing the page, it now just downloads it. Any ideas? The page is called sitempa.xml and the script is below. My thoughts is that the new server does not support something but not sure what to ask them to activate.

    Code:
    <?php
    
    // include init which contains all the includes.
    include('init.php');
    ...
    See more | Go to post

  • adamjblakey
    replied to htaccess redirect except 1 page
    Thanks for your help so far, i dont have access to the rewrite log to turn this on as i am on a shared hosting package. Is there anything else i can do at all?
    See more | Go to post

    Leave a comment:


  • adamjblakey
    replied to htaccess redirect except 1 page
    Sorry tried again but this still does not work. Any other options?
    See more | Go to post

    Leave a comment:


  • adamjblakey
    replied to htaccess redirect except 1 page
    Thank you very much for your reply. I have tried both variations but neither seem to work. Can you see any reason why these would not work?
    See more | Go to post

    Leave a comment:


  • adamjblakey
    started a topic htaccess redirect except 1 page

    htaccess redirect except 1 page

    Hi,

    I am using the following code to redirect my site to a mobile site:

    Code:
    #redirect mobile browsers
    RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/ [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/ [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
    RewriteRule ^(.*)$ http://www.mysite.mobi/
    ...
    See more | Go to post

  • adamjblakey
    started a topic Ajax Issue with IE

    Ajax Issue with IE

    Hi,

    I am running the following code on my website:

    Code:
    function showHint2(str)
    {
    if (str.length==0)
      { 
      document.getElementById("txtHint").innerHTML="";
      return;
      }
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
    ...
    See more | Go to post

  • Thanks a lot for that, just put the header on the pages that the description was printed and works fine. Thanks again.
    See more | Go to post

    Leave a comment:


  • Thanks very much it is much appreciated.
    See more | Go to post

    Leave a comment:


  • Hi Thanks for the fast reply, i have attached the file for you to have a look at. When i print the file to the page it comes out fine. It is just the process of adding the file to the database the problem occurs.

    ...
    See more | Go to post

    Leave a comment:


  • Thank you for all your replies. I tried using mysql_real_esca pe_string before being inserted but this did not work. Also in regards to the character set do you know how i can resolve this. The txt file is already present on the server, is there a way to open this and read while setting the character set?
    See more | Go to post

    Leave a comment:


  • Strange characters when importing text file into database?

    Hi,

    I have a strange issue, i have a txt file on the server with the following text in:

    Code:
    In what ways has 'time-space compression' transformed geographies of consumption and production?
    I am using the following to read the document:

    Code:
    	$file = "test.txt"; 
    	header('Content-Type: text/html; charset=utf-8');
    	$description = file_get_contents($file,0,NULL,0,1500);
    ...
    See more | Go to post

  • adamjblakey
    started a topic Problem with update function
    in PHP

    Problem with update function

    Hi,

    I have a function which updates a cart but it is not working correctly. Basically if i have e.g.

    2 x Red Shoes
    3 x Blue Shorts

    And then i change the qty of the blue shorts to 4 and pass to the update function it just completely removes the first lot of items in the list e.g. the 2 x red shorts.

    The data is stored in a session like so:
    Code:
    58:|Red Shoes|14.95,58:|Red Shoes|14.95,56:|Blue
    ...
    See more | Go to post

  • adamjblakey
    replied to Onchange select
    Thank you very much for your reply, it works a treat :)
    See more | Go to post
    Last edited by Dormilich; Aug 20 '09, 11:09 AM. Reason: Please use [code] tags when posting code

    Leave a comment:


  • adamjblakey
    started a topic Onchange select

    Onchange select

    Hi,

    I have 2 lists in a form one for a type of property and the other for price type. What i want to do is have a function so if i select property "Flats" then the price type menu will alter to Per Week.

    This is what i have so far but don't know how to go after this?

    Code:
       function doChange() {
    
          var sel = document.forms[0].property_type.selectedIndex;
    ...
    See more | Go to post

  • adamjblakey
    replied to Using FTP via PHP
    in PHP
    Hi,

    I have come up with the solution to this now but have a little problem.

    I am now using this to upload the images.

    [PHP]
    function ftpupload($file , $img_tmp, $path){

    $message = '';
    if ($ftp = ftp_connect($_S ESSION['ddomain'])) {
    if (ftp_login($ftp , $_SESSION['dname'], $_SESSION['dpass'])) {
    ftp_pasv($ftp, true);
    ...
    See more | Go to post

    Leave a comment:


  • adamjblakey
    replied to Using FTP via PHP
    in PHP
    Thank you for your reply, the disk space is not the problem as i have check this and it is fine. I don't have a firewall on so this cannot be the problem either. The file is not corrupt either.

    I did investigate this but i could not find out the problem even after hours of looking at it, and was feeling like i was going in circles.

    Cheers,
    Adam
    See more | Go to post

    Leave a comment:


  • adamjblakey
    replied to Using FTP via PHP
    in PHP
    Right i have given up doing it that way, i have however found a way that does upload but when the file is uploaded on the server it is 0kb but at least it is uploading.

    [PHP]
    function ftpupload($file ){

    $ch = curl_init();
    $localfile = $file;
    $fp = fopen($localfil e, 'r');
    curl_setopt($ch , CURLOPT_URL, 'ftp://'.$_SESSION['name'].':'.$_SESSION['pass'].'@87.229.14.87/httpdocs/uploads/images/thumbs/'.$file);...
    See more | Go to post

    Leave a comment:


  • adamjblakey
    replied to Using FTP via PHP
    in PHP
    Thank you for your reply,

    I have tried using the IP but this did not work either. I have changed the script a bit now to see where it is failing and it seems to connect fine to the FTP. The problem is with sending the file.

    [PHP]
    function ftpupload($file , $destination){

    // set up the settings
    $ftp_server = "ftp.".$_SESSIO N['domain'];
    $ftpuser = $_SESSION['user'];...
    See more | Go to post

    Leave a comment:


  • adamjblakey
    started a topic Using FTP via PHP
    in PHP

    Using FTP via PHP

    Hi,

    I am trying to upload some files using ftp via php.

    I have built a function which should work as far as i can see but it isn't. Can anyone see why this would not work?


    [PHP]
    function ftpupload($file , $destination){

    // set up the settings
    $ftp_server = "ftp.".$_SESSIO N['domain'];
    $ftpuser = $_SESSION['user'];
    $ftppass = $_SESSION['pass'];...
    See more | Go to post
No activity results to display
Show More
Working...