Jump to content

abrahamgarcia27

Members
  • Posts

    131
  • Joined

  • Last visited

About abrahamgarcia27

  • Birthday 07/27/1989

Contact Methods

  • Website URL
    http://www.sunerandgarcia.com/
  • Skype
    abrahamgarcia27

Profile Information

  • Gender
    Male
  • Location
    San Diego CA
  • Interests
    Web Design, San Diego Web Design, PHP Developer in San Diego, jQUery, MySQL

abrahamgarcia27's Achievements

Member

Member (2/5)

1

Reputation

  1. maybe it has to do something with your $path variable. Can we see that?
  2. I believe you can do this via .htaccess Check this out http://stackoverflow.com/questions/4548860/replacing-php-ext-with-html-through-htaccess
  3. What happens if you remove the () from this line? <option value="first_name:" ><?php echo($row['first_name']);?></option> so like this <option value="first_name:" ><?php echo $row['first_name'];?></option>
  4. I did this. Do you think this can cause me a problem? Now i see that once their is a new tags for a new row it does not separate it with a comma i guess i have to do a tags table. Or do you see any way i can fix this. function getBlogTags2(){ $db = Database::obtain(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); $sql = "SELECT tags FROM `".TABLE_BLOG."` ORDER BY RAND()"; $rows = $db->fetch_array($sql); $data = array(); foreach ($rows as $t) { $theTags .= $t['tags']; } $theTags = explode(',', $theTags); foreach ($theTags as $value) { $data[] = $value; } return $data; } Then to display i did this $tags = getBlogTags2(); $random_keys=array_rand($tags,5); foreach ($random_keys as $key => $value) { echo $tags[$value]; echo "<br>"; }
  5. Yeah i was afraid that i needed to separate the tags table. Well i was thinking that i could do the following *bold are the ones that the random query would retrieve Blog Post 1 | john,carlos,micheal Blog Post 2 | test, test2, test3 Blog Post 3 | php, testing, blog post Result Tags carlos, test3, php I know separating would make this taks really easy
  6. So i have a blog that has the tags store in one field in my blog table. So tags are saved as this in each blog post with its respective tags. Tags: john, carlos, the great tag, this is a tag What i want to do is get random tags from each blog post and display them. I am not sure how i can begin to make this query. Do you guys have an idea on how to do this?
  7. Do you have a working example of what you made?
  8. Have you guys ever build a smart queries for users too generate reports basically on anything they may want. I am looking on making something very user friendly. I do not have any ideas where to start
  9. I have a click handler that is causing some problem. I am using hammer.js for a slider. This is the link http://ingrub.com/iphone/ When you hit the last slide the text of next changes to let's grub, but the problem is that if you swipe back to an earlier screen and you try to go next it automatically goes to the link instead of going to the next slide these are some of the functions that i am using this.showPane = function(index, animate) { // between the bounds index = Math.max(0, Math.min(index, pane_count-1)); current_pane = index; var offset = -((100/pane_count)*current_pane); setContainerOffset(offset, animate); if(current_pane == 2){ $(".next2").text("Let's Grub"); $(".navigation2").addClass('linkMe'); } else { $(".next2").text("Next"); $(".navigation2").removeClass('linkMe'); } }; $( ".next2" ).click(function() { carousel.next(); $('.linkMe').click(function() { window.location = "discover.html"; }); return false; }); I am not sure what to do to fix this bug.
  10. When i was developing the API i had problems with the apache_request_headers so i added the following function to fix the issue if( !function_exists('apache_request_headers') ) { function apache_request_headers() { $arh = array(); $rx_http = '/\AHTTP_/'; foreach($_SERVER as $key => $val) { if( preg_match($rx_http, $key) ) { $arh_key = preg_replace($rx_http, '', $key); $rx_matches = array(); // do some nasty string manipulations to restore the original letter case // this should work in most cases $rx_matches = explode('_', $arh_key); if( count($rx_matches) > 0 and strlen($arh_key) > 2 ) { foreach($rx_matches as $ak_key => $ak_val) { $rx_matches[$ak_key] = ucfirst($ak_val); } $arh_key = implode('-', $rx_matches); } $arh[$arh_key] = $val; } } return( $arh ); } } I believe this is the problem. i am going to try to change environment see if i get a different result
  11. I am not getting any error log this are the latest one /home/ingrub/public_html/api/v2/index.php on line 53 [05-May-2014 04:31:16 UTC] PHP Fatal error: Call to a member function get() on a non-object in /home/ingrub/public_html/api/v2/index.php on line 53 [05-May-2014 04:32:13 UTC] PHP Fatal error: Call to a member function post() on a non-object in /home/ingrub/public_html/api/v2/index.php on line 53 [05-May-2014 05:39:50 UTC] PHP Parse error: syntax error, unexpected T_VARIABLE in /home/ingrub/public_html/api/v2/index.php on line 67 its weird because when i use it in my rest application to call the info it works fine, but not via ajax so i have a feeling something is wrong with the jquery function this is the console log error from the browser Failed to load resource: the server responded with a status of 404 (Not Found) http://api.ingrub.com/v2/locations/32.6724822/-116.9447485 XMLHttpRequest cannot load http://api.ingrub.com/v2/locations/32.6724822/-116.9447485. Invalid HTTP status code 404 index.html:1
  12. I wrote The api myself or you mean the hosting company? Yeah it is really weird i still cannot understand it
  13. But its not working with the jquery code
  14. I am having an error doing an ajax call to this REST point this is the point http://api.ingrub.com/v2/locations/32.6724822/-116.9447485 this is the ajax function with jquery $.ajax({ url: 'http://api.ingrub.com/v2/locations/32.6724822/-116.9447485', type: "GET", beforeSend: function(xhr){xhr.setRequestHeader('auth', 'b26d5f5881f8a030e2d33085a65ad15e');}, dataType: 'json', success: function(response) { } }); I get a 404 error Not Found. Any ideas why this might be happening?
  15. this is how data is stored in the database. Is this bad? <p style=\"text-align: justify;\"><span>We are pro then when i display this i do stripslashes.
×
×
  • 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.