Jump to content

zq29

Staff Alumni
  • Posts

    2,752
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by zq29

  1. Generally, in the UK, you need to have an Online Merchants account with your bank - Similar to the merchants account you have with the CC terminal. Then you'll need an account with a  payment gateway, such as SecPay, WorldPay, ProTX, etc.

  2. Go into your display settings and check how high your resolution slider will go. If it only goes up to 640x480 - Your graphics hardware can only support VGA, 800x600 and your hardware supports SVGA, 1024x768 - XGA, 1280x1024 - SXGA, and so on...

  3. I'd imagine qualifications are only useful if you're applying for a developers position at a company.

     

    Working directly for the end-client as a freelancer or sole trader with qualifications would mean nothing I think - They're unlikely to know or care what languages you use, as long as it does what they want.

     

    A solid portfolio is much better than qualifications in my mind.

  4. First up, I don't have (or want) an iPhone. But in what situation would you require the use of a stripped down version of the PHP manual on your phone?

     

    From my perspective, you surely must be developing a script at the time, on your computer, in a world of 'always-on' internet connctivity - And for those that don't have constant connectivity, they surely have an offline version of the manual on their computer and possibly built into their IDE.

  5. Enclose your values in double quotes...

    <?php
    $line .= "\"$orderID\"\t\"$quantity\"\t\"$message1\n$message2\"\t\"$productmail\"\t\"$colormail\"\t\"$sizemail\"\t\"$liconmail\"\t\"$riconmail\"\t\"$ticonmail\"\n";
    ?>

  6. I'd recommend generating your Excel file in a separate script and linking to it...

     

    <?php
    header("Content-Type: application/vnd.ms-excel");
    header("Content-Disposition:filename=file.xls");
    
    $r = mysql_query("SELECT * FROM `foo`") or die(mysql_error());
    while($rr = mysql_fetch_assoc($r)) echo "\"$rr[foo_0]\",\"$rr[foo_1]\",\"$rr[foo_2]\"\n";
    ?>

  7. A number of options here.

    • You could stick with your styling method you used above, but improve it by checking the dimensions of the image first with getimagesize()
    • Build a scaled version of the image with the GDLib functions, I believe you can reference remote files as your source with imagecreatefromjpeg() - Check the manual for rescaling, a couple of people have posted up scripts in the comments if you can't figure it out.

  8. Cool list, I currently only use the Web Developer Toolbar and FireBug, I think I'd find that colour picker one useful - I'll try a couple of them out when I get into the office on Monday I think...

  9. I couldn't see an issue around line 43 either, but just a tip while I'm here - It's quicker to type

    <?php
    foreach($_POST as $k => $v) $$k = stripslashes($v);
    ?>

    Than it is to type

    <?php
    $firstname = stripslashes($_POST['firstname']);
    
    
    $lastname = stripslashes($_POST['lastname']);
    
    
    $phone1 = stripslashes($_POST['phone1']);
    
    
    $phone2 = stripslashes($_POST['phone2']);
    
    
    $phone3 = stripslashes($_POST['phone3']);
    
    
    $dobmo = stripslashes($_POST['dobmo']);
    
    
    $dobda = stripslashes($_POST['dobda']);
    
    
    $dobyr = stripslashes($_POST['dobyr']);
    
    
    $ss1 = stripslashes($_POST['ss1']);
    
    
    $ss2 = stripslashes($_POST['ss2']);
    
    
    $ss3 = stripslashes($_POST['ss3']);
    
    
    $dl1 = stripslashes($_POST['dl1']);
    
    
    $dl2 = stripslashes($_POST['dl2']);
    
    
    $dl3 = stripslashes($_POST['dl3']);
    
    
    $dlstate = stripslashes($_POST['dlstate']);
    
    
    $dlexp1 = stripslashes($_POST['dlexp1']);
    
    
    $dlexp2 = stripslashes($_POST['dlexp2']);
    
    
    $dlexp3 = stripslashes($_POST['dlexp3']);
    
    
    $curaddress = stripslashes($_POST['curaddress']);
    
    
    $curcity = stripslashes($_POST['curcity']);
    
    
    $curstate = stripslashes($_POST['curstate']);
    
    
    $rentorown1st = stripslashes($_POST['rentorown1st']);
    
    
    $1stlandlord = stripslashes($_POST['1stlandlord']);
    
    
    $1stphone1 = stripslashes($_POST['1stphone1']);
    
    
    $1stphone2 = stripslashes($_POST['1stphone2']);
    
    
    $1stphone3 = stripslashes($_POST['1stphone3']);
    
    
    $1stmo = stripslashes($_POST['1stmo']);
    
    
    $1styr = stripslashes($_POST['1styr']);
    
    
    $1streason = stripslashes($_POST['1streason']);
    
    
    $preaddress = stripslashes($_POST['preaddress']);
    
    
    $precity = stripslashes($_POST['precity']);
    
    
    $prestate = stripslashes($_POST['prestate']);
    
    
    $rentorown2nd = stripslashes($_POST['rentorown2nd']);
    
    
    $2stlandlord = stripslashes($_POST['2ndlandlord']);
    
    
    $2ndphone1 = stripslashes($_POST['2ndphone1']);
    
    
    $2ndphone2 = stripslashes($_POST['2ndphone2']);
    
    
    $2ndphone3 = stripslashes($_POST['2ndphone3']);
    
    
    $2ndmo = stripslashes($_POST['2ndmo']);
    
    
    $2ndyr = stripslashes($_POST['2ndyr']);
    
    
    $2ndreason = stripslashes($_POST['2ndreason']);
    
    
    $employer = stripslashes($_POST['employer']);
    
    
    $position = stripslashes($_POST['position']);
    
    
    $moincome = stripslashes($_POST['moincome']);
    
    
    $empphone1 = stripslashes($_POST['empphone1']);
    
    
    $empphone2 = stripslashes($_POST['empphone2']);
    
    
    $empphone3 = stripslashes($_POST['empphone3']);
    
    
    $timeatempmo = stripslashes($_POST['timeatempmo']);
    
    
    $timeatempyr = stripslashes($_POST['timeatempyr']);
    
    
    $othersource = stripslashes($_POST['othersource']);
    
    
    $empaddress = stripslashes($_POST['empaddress']);
    
    
    $empcity = stripslashes($_POST['empcity']);
    
    
    $empstate = stripslashes($_POST['empstate']);
    
    
    $pets = stripslashes($_POST['pets']);
    
    
    $eviction = stripslashes($_POST['eviction']);
    
    
    $ref1 = stripslashes($_POST['ref1']);
    
    
    $ref1phone1 = stripslashes($_POST['ref1phone1']);
    
    
    $ref1phone2 = stripslashes($_POST['ref1phone2']);
    
    
    $ref1phone3 = stripslashes($_POST['ref1phone3']);
    
    
    $ref2 = stripslashes($_POST['ref2']);
    
    
    $ref2phone1 = stripslashes($_POST['ref2phone1']);
    
    
    $ref2phone2 = stripslashes($_POST['ref2phone2']);
    
    
    $ref2phone3 = stripslashes($_POST['ref2phone3']);
    
    
    $ref3 = stripslashes($_POST['ref3']);
    
    
    $ref3phone1 = stripslashes($_POST['ref3phone1']);
    
    
    $ref3phone2 = stripslashes($_POST['ref3phone2']);
    
    
    $ref3phone3 = stripslashes($_POST['ref3phone3']);
    
    
    $numadults = stripslashes($_POST['numadults']);
    
    
    $numchildren = stripslashes($_POST['numchildren']);
    
    
    $adult1 = stripslashes($_POST['adult1']);
    
    
    $adultrelation1 = stripslashes($_POST['adultrelation1']);
    
    
    $adult2 = stripslashes($_POST['adult2']);
    
    
    $adultrelation2 = stripslashes($_POST['adultrelation2']);
    
    
    $adult3 = stripslashes($_POST['adult3']);
    
    
    $adultrelation3 = stripslashes($_POST['adultrelation3']);
    
    
    $adult4 = stripslashes($_POST['adult4']);
    
    
    $adultrelation4 = stripslashes($_POST['adultrelation4']);
    
    
    $email = stripslashes($_POST['email']);
    
    
    $message = stripslashes($_POST['message']);
    
    
    $certify = stripslashes($_POST['certify']);
    ?>

  10. The mod_rewrite manual pages do come across as looking harder than it is. If you searched for tutorials on URL rewriting it all becomes a lot more straight forward. You will however need to be able to write (mostly basic) regular expressions. For instance, my previous example is as easy as the following...

    #Assuming localhost/database is the webroot
    RewriteRule ^display/([0-9]+)\.html$    display.php?num=$1

     

    There are a number of advantages, here are a few:

    • Readability
    • Generally quicker to type
    • Easier to convey to people when talking over the phone, for example
    • Search engines used to like them a lot better when spidering - How relevant that is today, I don't know
    • It can add an extra layer of security, for example, in my example above, display.php is expecting nothing but an integer to come through in $_GET['num'], the regular expression ensures that - Though you'll need other rules to prevent passing anything to the original URL

  11. You will not be able to "interactively" crop an image with PHP alone, you'd need JavaScript to build the interface with, which I'd imagine is where the proportional restraints will be managed, though backed up with PHP to add a layer of anti-tampering.

     

    You'd pass the coordinates generated by your JavaScript to either PHPs GDLib functions, or something like ImageMagick.

×
×
  • 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.