-
Posts
1,469 -
Joined
-
Last visited
-
Days Won
12
Everything posted by CroNiX
-
The error message he pasted says "on line 4"
-
Do you want to match actual WORDS? Or just see if a string is located within a string? If it's the first one, you don't want to use stripos() as it will do the 2nd one. Like if you want to search for "admin", stripos() would find it in: "let's readminister the medicine" "administrative assistant" etc.
-
Why aren't you using jQuery's $.ajax() for your ajax calls since you're already using jQuery?
-
You can try to get the parent div of the button that was clicked. $(".button").click(function(){ $(this).parent('div').load("form.php .new-form"); }); Not sure what the ".new-form" stuff is in your jQuery.load() function though... Here's a quick jsfiddle to show it will target the correct div by changing the background color of the div where the button was clicked http://jsfiddle.net/x276emhc/
-
Trigger a function again after AJAX Success
CroNiX replied to emmontenegro's topic in Javascript Help
Create a named function instead of an anonymous one. Then just call it with your load function and also your ajax success callback. -
Dropdown list read arabic characters from mysql DB
CroNiX replied to snhlawy's topic in PHP Coding Help
That means your query failed and you don't have a check for it. The first example in the php.net docs for mysql_query() show how to do that. However, pay attention to the big pink notice at the top of the page in the manual. The mysql extension is deprecated and won't be available in future versions of php, so if you want your app to work in the future without having to rewrite all of your DB stuff, you should use PDO or MySQLi (with an i) extension. -
You don't put quotes around the text values in your json object. They're not needed around keys unless the key contains a space, but that doesn't really matter, but it does for the values.
-
Chrome and Firefox compatibility issue for parsing variables
CroNiX replied to kamal213's topic in Javascript Help
You're not actually "using" jquery there. I see nothing jquery related. You're using pure javascript. If you used jquery's ajax() method, it would work in all browsers and you'd need a lot less code. -
What I'd do is make them create the car entity with the basic details first. Then you know the ID. After initial creation, allow them to upload photos or anything else that needs to be done. Getting the next value of an auto_increment fields is NOT a good idea. What if you have 2 people trying to create a new car entity at the same time before saving? You'd have 2 of the same ID. If you create the car first, you won't have that problem.
-
Did you post a reply in the threads that you received email from? If you reply to a thread, it subscribes you to that thread. You can change that behavior if you click on your username and go to the "My Settings" menu and then "notification options" and change the " Auto follow topics I reply to. Notification frequency: " They recently reactivated email notifications so they started showing up for my in my email as well.
-
Open firebug and click on the bug icon. The very last line in the drop down menu that appears is the current version YOU are running. IE "About 2.0.7" Then go to https://getfirebug.com/downloads/ It will say what the current stable version is. If the one on getfirebug is newer than the one you have installed, click the download link for the newest version and install it. That's it.
-
Well, what are you POSTing? Is it from a form? Some dynamic AJAX? What is so large that is being sent in POST? We have no idea what's causing it either as you haven't provided any code to go on other than an error message which states you are POSTing too much data for your current post_max_size setting. So the answers addressed that point.
-
Best way to approach subboards on custom coded forums?
CroNiX replied to idkwhy's topic in PHP Coding Help
I like to use the MPTT technique for hierarchial data. You can retrieve it all in a single query. The inserts/updates are a little slower than the adjacency list technique, but the reads are very quick. We do way more reads than writes to the hierarchy, so this works well for us. Our hierarchies are very large with thousands of entries and read any point in the "tree" lightning quick. -
Additionally, you can use the PEL library to edit the jpg's exif data.
-
When posting code, please use the code tags (it's the <> on the menu bar) to make your code much more readable to us.
-
Can I use SQL Server with PHP / HTML locally
CroNiX replied to JohnMPHP's topic in Microsoft SQL - MSSQL
Look into WAMP, which will install Apache/Mysql/PHP on a windows system and set everything up to run together. You will need a webserver running locally to process the php scripts. It doesn't have to be a remote server. You DONT need a webserver if you are executing the php scripts via the command line, but most likely you'd want to be using a browser to access the page since you want to generate <select> form elements (combobox as you referred to it). -
Import large CSV into MYSQL / Access directory outside web root
CroNiX replied to enveetee's topic in PHP Coding Help
The php user for that site, or the group the user belongs to, needs to have read/write permissions for whatever dir they are trying to access outside of that users "home". Well probably just read permissions if you are manually uploading the file. Otherwise any php user on the server, for any website, can read/write each others files, which is like NO security. -
It's best to just post the code so here it is. <?php $xml_string = file_get_contents($_REQUEST['url']); $xml = simplexml_load_string($xml_string); $json = json_encode($xml); echo $json; ?>
-
Sure, just split the string on "|", and grab the first part of the new array data.formatted_address = data.formatted_address.split('|')[0]; var formatted_marker_data = "<div class=\"map_header\">" + data.formatted_address + "</div>
-
Try something like: $method = 'domainstatus_' . $result; $result->$method->domainstatus_title = $this->domain_model->get_by_status($result->domainstatus_id);
-
$_POST['doLogin'] will only exist once the form's been submitted. You're trying to use it right away, so it won't exist when the page is first requested. Try something like: //Check if form was submitted via POST if($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['doLogin']=='Login') { foreach ($_POST as $key => $value) { $data[$key] = filter($value); // post variables are filtered } }
-
You should post the form HTML as well, or whatever is sending this data (ajax?) Does your form have a field with a NAME of "doLogin"? Is your form's METHOD set to POST or GET? You're using both $_POST and $_GET
-
Want to extract page title from url
CroNiX replied to astarmathsandphysics's topic in PHP Coding Help
How about showing the code where you are generating your current titles? Very difficult to give accurate/good answers without that. -
But I believe Requinix is correct and they are going by the ID at the end. http://www.ebay.co.uk/itm/some-crap-here/151458954958 loads the same content as the original. http://www.ebay.co.uk/itm/Toshiba-Satellite-C50-AMD-E-Series-1-4GHz-Dual-Core-15-6-Inch-500GB-2GB-Laptop/151458954958