+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
Web Development Thread, Date? String? Pulling my hair out here! Help! in Coding and Web Development; I have never used phpgrid but the next step is to check the actual function which is taking your sql ...
  1. #16

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,631
    Thank Post
    890
    Thanked 1,314 Times in 798 Posts
    Blog Entries
    1
    Rep Power
    441
    I have never used phpgrid but the next step is to check the actual function which is taking your sql input provided by them using exit's and break's to output whats going on.
    Its possible there is some checks to prevent sql injection etc and its automatically filtering your string.
    Also what version of php are you running?

  2. Thanks to ZeroHour from:

    FragglePete (30th May 2013)

  3. #17

    Join Date
    Feb 2008
    Location
    Wiltshire
    Posts
    877
    Thank Post
    274
    Thanked 139 Times in 112 Posts
    Blog Entries
    26
    Rep Power
    42
    Ok - Firstly, thanks for you all your help people. I'll be hitting that 'Thank Post' button alot.

    I got in contact with the developer, and got a response that if using $_POST I need to set a session variable and use that. It seems to work now.

    Really like this phpgrid, so much so I brought a license for the school for what I'm doing as it just makes things so easy.

    Cheers all

    Pete

  4. #18
    S.C.'s Avatar
    Join Date
    Nov 2012
    Location
    Cramlington
    Posts
    56
    Thank Post
    2
    Thanked 7 Times in 7 Posts
    Rep Power
    5
    Have you got PHPmyAdmin running on your webserver? A handy little way to debug your query is to echo back your query and copy and paste it into SQL tab of the database table (supportstaff_section1_b) in question. I've solved half a dozen issues like that. I'd also be tempted to echo something from your phpConnection.php page just to make sure that connection is working. Quince

  5. Thanks to S.C. from:

    FragglePete (31st May 2013)

  6. #19
    thesk8rjesus's Avatar
    Join Date
    Sep 2008
    Posts
    107
    Thank Post
    11
    Thanked 6 Times in 6 Posts
    Rep Power
    13
    Hi not sure if you got this sorted already but hopefully this code will help

    Object oriented
    Code:
    $date = new datetime( $_POST['dbDate'] );
    $selecteddate = $date->format( 'Y-m-d' );
    Procedural
    Code:
    $date = date_create( $_POST['dbDate'] );
    $selecteddate = date_format( $date, 'Y-m-d' );
    Also with your query you could write the follow as the variable will work in the double quotations.
    Code:
    $query = "SELECT * FROM tbldetentions WHERE DateSetFor = '$selecteddate'";

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Registry Edit Problem, ripping my hair out here!!
    By phillip_croxford in forum Windows 7
    Replies: 4
    Last Post: 21st September 2012, 02:19 PM
  2. FTP - Pulling my Hair Out!
    By techyphil in forum Internet Related/Filtering/Firewall
    Replies: 17
    Last Post: 20th May 2011, 12:21 PM
  3. Pulling my hair out - cannot access port on server
    By JPS in forum Internet Related/Filtering/Firewall
    Replies: 8
    Last Post: 14th December 2010, 04:33 PM
  4. Frog - Slow ! Pulling my hair out
    By FragglePete in forum Virtual Learning Platforms
    Replies: 21
    Last Post: 20th September 2010, 07:58 PM
  5. Help needed (before I pull my hair out :) )
    By Talorin in forum General Chat
    Replies: 13
    Last Post: 29th June 2009, 09:26 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •