Jump to content

TRI0N

Members
  • Posts

    215
  • Joined

  • Last visited

About TRI0N

  • Birthday 07/22/1970

Profile Information

  • Gender
    Male
  • Location
    California

TRI0N's Achievements

Member

Member (2/5)

0

Reputation

  1. Not sure about Ajax but this can easily be done with FancyBox jQuery with href new_query.php?id=### with a MySQL Query to pull from another database. http://fancybox.net/ Example on top row middle effect is nice to use for such things.
  2. For starters I see this '$_POST' which should be $_POST['email'] also email tends to be a script call and usually never works on a lot of out of box setups. So change that to $_POST['e_mail'] and all references of email to e_mail.
  3. MySQL does not like users using root as the connections for Query's outside of PHPMySQL and in some instances does not allow you to connect with root at all via different providers. I would assume that once you get your MySQL up and running that you create a user for external queries and use root for Administration Only.
  4. TRI0N

    mysqli count

    $i = 0; $result = $mysqli->query("SELECT COUNT(Gender) FROM table where Gender = 'F'"); $i = $i + 1 ; $Female = $result->fetch_row(); Echo $i for your counter...
  5. Your best bet is to just use this: http://www.adamek.biz/md5-generator.php Type in a new password and get the MD5 and replace the old one with the new one generated.
  6. TRI0N

    date format

    I just noticed your original date format is 1/15/2013 The correct code to convert: $my_date_format = '1/15/2013' ; $date_fix = explode('/', $my_date_format) ; $new_month = $date_fix[0] ; $new_day = $date_fix[1] ; $new_year = $date_fix[2] ; $new_date_to_store = $new_year.'-'.$new_month.'-'.$new_day ; The correct code to display: $db_date_format = $row['date'] ; $date_fix = explode('-', $db_date_format) ; $new_year = $date_fix[0] ; $new_month = $date_fix[1] ; $new_day = $date_fix[2] ; $new_date_to_display = $new_month.'/'.$new_day.'/'.$new_year ; echo $new_date_to_display ; That will do the trick!
  7. TRI0N

    date format

    The only problem that storing dates in VARCHAR is that PHP Date functions have more flexibilities when you wish to short or calculate dates in the correct date format. If you do this those functions will not work like they should if the date is not in its standard format.
  8. TRI0N

    date format

    You will need to explode your m-d-Y to Y-m-d before inserting or updating into your database. $my_date_format = '1-15-2013' ; $date_fix = explode('-', $my_date_format) ; $new_month = $date_fix[0] ; $new_day = $date_fix[1] ; $new_year = $date_fix[2] ; $new_date_to_store = $new_year.'-'.$new_month.'-'.$new_day ; $new_date_to_store is the date format you will want to store into your database. Then you will need to do the exact same thing to reverse the date upon SELECT to parse it to the format you want to see when viewed on a page. $db_date_format = $row['date'] ; $date_fix = explode('-', $db_date_format) ; $new_year = $date_fix[0] ; $new_month = $date_fix[1] ; $new_day = $date_fix[2] ; $new_date_to_display = $new_month.'-'.$new_day.'-'.$new_year ; echo $new_date_to_display ;
  9. Okay here is what I have in the works. What I want to achieve is the ability to update the order of items in a database upon change and if an item is moved from one tab to another it will update as well. <?php include ('global.php') ; ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>IT WHITEBOARD</title> <link rel="stylesheet" href="css/jquery-ui.css" /> <script src="jquery-1.8.3.js"></script> <script src="jquery-ui.js"></script> <style> #sortable1 li, #sortable2 li, #sortable3 li, #sortable4 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 100%; } </style> <script> $(function() { $( "#sortable1, #sortable2, #sortable3, #sortable4" ).sortable().disableSelection(); var $tabs = $( "#tabs" ).tabs(); var $tab_items = $( "ul:first li", $tabs ).droppable({ accept: ".connectedSortable li", hoverClass: "ui-state-hover", drop: function( event, ui ) { var $item = $( this ); var $list = $( $item.find( "a" ).attr( "href" ) ) .find( ".connectedSortable" ); ui.draggable.hide( "slow", function() { $tabs.tabs( "select", $tab_items.index( $item ) ); $( this ).appendTo( $list ).show( "slow" ); }); } }); }); </script> </head> <body> <div id="tabs"> <ul> <li><a href="#tabs-1">Emergency Tasks</a></li> <li><a href="#tabs-2">Priority Tasks</a></li> <li><a href="#tabs-3">Issues List</a></li> <li><a href="#tabs-4">Completed Tasks</a></li> </ul> <div id="tabs-1"> <ul id="sortable1" class="connectedSortable ui-helper-reset"> <?php // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname") ; // Validate Connection $result1 = mysql_query("SELECT * FROM tasks WHERE priority = 'Emergency' ORDER BY order_no ASC") ; while($row = mysql_fetch_array($result1)) { $job_name = $row['job_name'] ; echo '<li class="ui-state-default"><a href="/">'.$job_name.'</a></li>' ; } // Close Query mysql_close($result1) ; ?> </ul> </div> <div id="tabs-2"> <ul id="sortable2" class="connectedSortable ui-helper-reset"> <?php // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname") ; // Validate Connection $result2 = mysql_query("SELECT * FROM tasks WHERE priority = 'Priority' ORDER BY order_no ASC") ; while($row = mysql_fetch_array($result2)) { $job_name = $row['job_name'] ; echo '<li class="ui-state-default"><a href="/">'.$job_name.'</a></li>' ; } // Close Query mysql_close($result2) ; ?> </ul> </div> <div id="tabs-3"> <ul id="sortable3" class="connectedSortable ui-helper-reset"> <?php // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname") ; // Validate Connection $result3 = mysql_query("SELECT * FROM tasks WHERE priority = 'Issues' ORDER BY order_no ASC") ; while($row = mysql_fetch_array($result3)) { $job_name = $row['job_name'] ; echo '<li class="ui-state-default"><a href="/">'.$job_name.'</a></li>' ; } // Close Query mysql_close($result3) ; ?> </ul> </div> <div id="tabs-4"> <ul id="sortable4" class="connectedSortable ui-helper-reset"> <?php // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname") ; // Validate Connection $result4 = mysql_query("SELECT * FROM tasks WHERE priority = 'Completed' ORDER BY order_no ASC") ; while($row = mysql_fetch_array($result4)) { $job_name = $row['job_name'] ; echo '<li class="ui-state-default"><a href="/">'.$job_name.'</a></li>' ; } // Close Query mysql_close($result4) ; ?> </ul> </div> </div> </body> </html> I have also attached the CSS file if needed. All other .js files are standard jQuery Libary.
  10. Here is what I'm attempting to do. I have a rectangle that fixed on a page and is 170 wide and 32 Height, I want to :hover to make an image 170 x 170 slide up from the rectangle when mouse in on over. Then of course collapse when the on mouse out. I have looked all over for this but only get a collapse div answer to make the rectangle grow but that is not my objective. Any help greatly appreciated.
  11. Yep and now with the Full Opening Tags the data is parshing just as it should. Thanks.. Oh and I was refering to other help as not being helpful. Yours help was right on the money.
  12. Yep that was it.. php.ini is setup for strict PHP and the Tags where the reason. Good reason to. I will just go back into my work and make sure all tags are pressent. Thanks a ton PFMaBiSmAd! I knew my php setup was good and very secured so missing the tags threw me off.
  13. If what you think is a setting in php.ini then point me to it. But the above didn't help much and any changes to things I always run service httpd restart.
  14. Here is what the PHP code looks like that outputs the above into the page when viewed: <? // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname3") ; // Check Events in Events Database $result1 = mysql_query("select distinct * from cdc_sales WHERE processed = '0'") ; while($row = mysql_fetch_row($result1)) { echo '<a href="purchase_details.php?id='.$row[0].'">'.$row[2].', '.$row[1].'</a><br>' ; } // Close Database Connection mysql_close(); ?> </td> </tr> <tr> <td> </td> </tr> <tr> <td>Gift Certificate Purchases:</td> </tr> <tr> <td> <? // Database Connection mysql_connect("$dbhost","$dbuser","$dbpasswd") ; // Database Selection mysql_select_db("$dbname3") ; // Check Events in Events Database $result2 = mysql_query("select distinct * from gift_certs WHERE processed = '0'") ; while($row = mysql_fetch_row($result2)) { echo '<a href="purchase_gc_details.php?id='.$row[0].'">'.$row[1].' :: '.$row[12].' :: '.$row[13].' :: '.$row[14].'</a><br>' ; } // Close Database Connection mysql_close(); ?> Best regards, TRI0N
  15. Actually it's setup correctly just securly with alot of things disabled. I'm sure it's just a simple setting to get this going again.
×
×
  • 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.