- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 70
- Posts with Upvotes
- 63
- Upvoting Members
- 46
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 4
I <3 PHP
https://www.upwork.com/fl/gcastillo
335 Posted Topics
Re: Out of all the things I lost I miss my mind the most - ozzy osbourne | |
![]() | Re: The Wolf Of Wall Street.. super funny movie! |
Re: `$db = new mysqli('','','','');` `$results = $db->query("SQL STATEMENT");` while($row = $results->fetch_assoc()){ echo $row['field_name']; } | |
Re: Try this: public function insert_into_db() { if( $this->db->insert('reservation', $this->input->post('no_of_poeple', TRUE)) ){ return TRUE; }else{ return FALSE; } } | |
Re: What are you trying to accomplish? When you say " Multidementional Array" from form, what are you doing with the array? The for post data is aready array. | |
Re: You can complete this task with typeahead.js library. [Bootstrap Typeahead](https://github.com/bassjobsen/Bootstrap-3-Typeahead) <input id="email_search" type="text" name="email_search" value=""> $('input#email_seach').typeahead({ ajax: '/search_database_for_email.php' displayField: 'email', valueField: 'id', onSelect: function(item) { //This is used to populate a hidden field with the email id if returned. $('input[name="email_id"]').val(item.value); } }); On the backend, do a query to the … | |
Re: How are you tracking the number of events being listed? @hericles mentioned update statment, you should show the full code for this script so we can see what is going on. | |
Re: do a `var_dump($pdf_decoded)` after the var assignment and see if you get your decoded content. Also, Where are you getting `send_custom_email()` function from? If you have created a custom function, within the same class, it should be `$this->send_custom_email()` | |
Re: LOL.... this almost sounds like a troll. | |
Re: Well to start, when you echo out your input checkbox, don't set id="delete". This will give all your inputs the same id of "delete" and that is bad html code.. If you want to assign delete to all you checkbox input's use a class So change: `<tr><td>Bil</td><td>Name</td><td><input id='delete' value='delete' title="select … | |
Re: That is strange, I have a hostgator shared hosting account and I have never had an issue with CI and admin routing.. I have had issues with "www.example.com/cpanel" and or "www.example.com/webmail" Check your dns settings... maybe you have a record that belongs to /admin. Also, this could be issue with … | |
Re: I believe etsy is runing ruby stack.. If not they should be, for an application of that size, you would get perfomance with a ruby stack. | |
Quick help, I can't seem to think right now, and I need to add these array values into a single total value for each array key. Importantly the total value. Array ( [0] => Array ( [sub_total] => 1000 [total_tax] => 82.5 [total] => 1087.5 ) [1] => Array ( … | |
Re: You better off storing the audio file within the file system and saving the file path into the database. If you want to store the audio file, you will need to store the file in binary, by using the BLOB datatype. I would recommend saving the file on the file … | |
Re: You could trying using a framework to help with the issue.. but for the most part. IE will be a bit different from FF or Chrome.. Bootstrap is good for most browsers, UIKit is a nother good framework as well. | |
Re: Have you noticed, more and more as time moves on, your is replacing you're. I see this all the time in txt and social media posts. | |
Re: Here is my version of csv uploading script. I user a library call [parsecsvlib.php](https://github.com/jimeh/php-parsecsv) include($_SERVER['DOCUMENT_ROOT'].'/public/lib/parsecsv.lib.php'); $csv = new parsecsv(); if(isset($_FILES['company_file'])){ $file = $_FILES['company_file']['name']; $upload = $_SERVER['DOCUMENT_ROOT'] . '/uploads/'; if(!file_exists($upload)){ mkdir($upload); } $allowed = array('.csv'); $ext = substr($file, strpos($file, '.'), strlen($file)-1); if(!in_array($ext, $allowed)){ echo 'File type not excepted!'; exit; } $file … | |
Re: Have you tried putting the function above all other code.. I usally set `e.preventDefault();` before any other code. Can we see the full code for your ajax and html form? ![]() | |
Re: You want us to do the work for you? Or do you want us to help you? We need to see what code you have so we can see the problem. ![]() | |
Re: Do you get any errors in you console.log? I usually add my `e.preventDefault()` at the top of my function, before the ajax. try: $('#addwishlist').on('click', function(e){ e.preventDefault(); var test = 'Test_post'; $.ajax({ url: '/addwishlist/test_ajax', type: 'POST', data: {post: test}, dataType: 'JSON', cache: false, success: function(json){ alert(json.message); console.log(json.post); } }); }); In … | |
Re: I saw you had a duplicate post.. You should not post duplicate posts, this will not get your question answered. As for your problem.. you can use a simple foreach loop to uplaod multiple files. $photos = $_FILES['photoimg']; foreach( $photos as $photo){ //Run your upload code and database code. $photo_name … | |
Re: Can we see some code that you have wrote? | |
Re: Can we see some code? I usually, create a timeout function with jquery and make ajax calls to a php funciton to update the database with any information I need saved. So, you can create a timer; then when the timer has reached its max value, send ajax call to … | |
Re: Where is the page? Can we see some code? Where are you searching for the query string? Are you doing this in the textbox with the website? We need to see some code to understand what you are talking about. | |
Re: If you are using this script to log someone into a session, then I would think you would want to use a call back to notify the user of success or failure. Also, you would want to redirect the set a cookie for the user. All will require a callbackfunction. … | |
Re: Like @cereal said you need to interate the array of data, then, if you would like to set the value of an input field, you would use. `set_value('name of input field', return data)` <input id="" class="" name="book_name" value="<?php echo set_value('book_name', $row->book_name); ?>" /> | |
Re: You can try using SimpleHtmlDom library to achieve your goals. Scrap the results from your query and save to DB or display on to the page. [SimpleHTMLDom](http://simplehtmldom.sourceforge.net/) ![]() | |
Re: Codeigniter has join functions with active records enabled. Like: `$this->db->join(table, matching id, type);`, but with complex tables I write my queries out. Like: $sql = "SELECT item_id, MAX(IF(prop = 'color', value, NULL)) AS color, MAX(IF(prop = 'size', value, NULL)) AS size FROM properties GROUP BY item_id;"; $q = $this->db->query( $sql … | |
Re: Try: `require_once($_SERVER['DOCUMENT_ROOT'] . '/inc/config.php');` ![]() | |
Re: Can we see your HTML? You would add an img tag just after your footer open tag or you could add a div with the background set to URL with the image URL as the property value | |
Re: Looks like she did a sweat job crocheting those dolls. what else does she do? | |
So I am trying to remove line feed within an array but not cariage returns. Having trouble using array walk, the ltrim function is not working. I need to remove ONLY the line feed("\n") not the cariage return("\r") so using trim will not work. I tried setting the chr(10) and … | |
Re: So its the browser companies fault that users incuding yourself, place malware on shady websites, and users including yourself visit shady sites with bad content. I have been working on the web for a very long time and I have only been hit by a virus or malware maybe a … | |
| |
Re: Have you thought about using base64 encoding? <?php $im = file_get_contents('filename.gif'); $imdata = base64_encode($im); ?> | |
Re: are you getting any PHP Errors? Can you display the error log? | |
Re: Have you thought about using jquery? jQuery's ajax function is really easy and can get your task done very quickly. Just a suggestion, I know some people like to use thier own code and not use libraries. Here is a sample of ajax call. sample: $(document).ready(function(){ $('input[type="submit"]').on('click', function($){ e.preventDefault(); $.ajax({ … | |
Re: `session_start()` needs to be the first line in every page using sessions. example: newpage.php <?php session_start(); code code code code code code session_write_close(); closing the session write when you are done writing to the session file, helps with proformance. index undefined: user means, you are asking php for $_POST['user'] when … | |
Re: What lang? What are you looking for? Please give more infomation. | |
Re: When you select from your database, you can use a couple of loops using the zip, you can start by searching for the zip exactly. `"SELECT * FROM table WHERE zip_code = $zip_code"` if no results are found, you can then search for results simular to the zip code, by … | |
Re: have you tried setting your htaccess to forece ssl RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L] | |
Re: Get all your products `SELECT * from products_table` if you need single product, get by id `SELECT * FROM products_table WHERE id = '$id'` If you have categories and use index id's `SELECT * FROM products_table WHERE category_id = '$cat_id'` you can use a foreach loop to get all the … | |
Re: Here is a plugin for jquery to solve the issue. [Click Here](http://www.jqueryscript.net/layout/jQuery-Plugin-For-Auto-Resizing-iFrame-iframe-Auto-Height.html) | |
Re: This should get you started. <?php $connection = mysqli_connect('host','username','password','database_name'); $sql = "SELECT * FROM recommendations ORDER BY recom_status, recom_name"; $query = mysqli_query($connection, $sql); $results = mysql_fetch_assoc($query); ?> <?php foreach($results as $result): ?> <h3><?php echo ucfirst($result['recom_status']; ?></h3> <table> <tr> <th>Name</th> <th>Date</th> <th>Size</th> </tr> <tr> <td><?php echo $result['recom_name']; ?> </td> <td><?php echo … | |
Re: Try putting the full URL in your action like: "http://example.com/xy.php" or use a forward slash like: "/xy.php" ![]() | |
Re: I see a few things wrong with your form page.. 1. `$clientid = $_GET['clientid']` This could lead to sql injection. you need to sanitize your code and put some safty checks. 2. `$db->query()` is object oriented and `mysql_fetch_assoch()` is procedurial. you should use one and stick with it. 3. Your … | |
Re: What is your issue? Where is the code failing? | |
Re: Have you thought about wrapping your video in a div, then adding other elements with position absolute and placing in different spots of the main wrapper div. I haven't tested the code below, but this should give you an idea of what I talking about. <style type="text/css"> #video-wrapper {position:relative;} #pos1 … |
The End.