-
Replied To a Post in Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
Yes, try the suggestions in my previous post and let us know the results. #Edit# Hmm looking better at your code, I doubt that this would work: "SELECT ArtistName,NAME of … -
Replied To a Post in Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
**@Mohamed** don't worry about her, she's a spammer. Regarding your problem, try to change this: $result_selecttemptable = mysql_query( $query_selecttemptable,$dbhandle); $row_selecttemptable = mysql_fetch_array($result_selecttemptable, $dbhandle); while($row_selecttemptable = mysql_fetch_array($result_selecttemptable, $dbhandle)){ echo $row_selecttemptable or … -
Replied To a Post in Link underline
Same here on: * Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 * Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0 I've seen this in many threads in … -
Replied To a Post in Array Manipulation
The big problem here is that `cells_num`, `grid_num` and `cell_weight` do not have a suffix, as the others, that would simplify a lot the game. Anyway, if these groups are … -
Replied To a Post in forgotpass.php function
Hi, I'm not sure if is this but: neither the `From:` header, nor the `Reply-To:` are correct email addresses. In the `From` header is missing the local part, i.e. the … -
Replied To a Post in Percentage of sites using jQuery UI?
Check this: http://trends.builtwith.com/javascript/jQuery-UI According to their statistics there are about 6 million websites that use JQueryUI. -
Replied To a Post in Array Manipulation
So, what have you done so far? -
Replied To a Post in help with this scrap please
I would like as AG would, but we still don't know what it does `cut_str()`, you're showing us the application use, not the source code of that function. This is … -
Began Watching Upload multiple images for one product using PHP
Hello, Happy new year guys.. I am trying to find a way to Upload and Display multiple images for one product on an ecommerce website that I am working on! … -
Replied To a Post in Universal website crawler
This happens because of the `X-Frame-Options` header, if the remote server uses a directive like this: Header always append X-Frame-Options SAMEORIGIN The browser will check and won't allow the iframes, … -
Replied To a Post in what is wrong with my code (while loop)
A small correction: you cannot compare booleans with integers, otherwise you get unexpected results. An example: $a['foo'] = FALSE; echo (int)$a['foo'] !== FALSE ? 'true':'false'; The problem here is given … -
Replied To a Post in The Power & Problems with PHP!
That's ok :) -
Replied To a Post in Happy 2014 :)
Happy New Year! :) -
Replied To a Post in PHP confusion
Ok. Maybe I'm missing something, but from what I see, I think your script should not work, because it needs some specific conditions. For example: `register_globals` is **on**? The documentation … -
Replied To a Post in help with this scrap please
Do you have something like `include` or `require` in top of your script? Check in those files. -
Replied To a Post in PHP confusion
Use the `$_SESSION` array instead: * http://www.php.net/manual/en/reserved.variables.session.php At the top of the script place `session_start()`, then define the variables you want to save to session, for example: <?php session_start(); $_SESSION['username'] … -
Replied To a Post in PHP confusion
The first argument of `session_is_registered()` must be a string, in your case `myusername` is not a constant, it's a string, so add the quotes: if(session_is_registered('myusername')) In addition these functions will … -
Replied To a Post in help with this scrap please
As I wrote: > The `cut_str()` is a user defined function, so if you want to use it you have to show us your code To be more accurate, show … -
Replied To a Post in help with this scrap please
The `cut_str()` is a user defined function, so if you want to use it you have to show us your code, otherwise use `preg_match_all()`, here's an example: function scrapit($data) { … -
Replied To a Post in Unexpected T_STRING in this code
The PDO connection takes 3 arguments: the first is used to set the kind of database `mysql:` then you set the **hostname** `host=` and the database name `dbname=`; the second … -
Replied To a Post in Use title Condition for fetching info from MySQL table - query needed
There is a little typo at line `6`, the closing parenthesis is after the double quote, so it is outside the query expression. Change it with this: $wpdb->get_row("SELECT name FROM … -
Replied To a Post in The Power & Problems with PHP!
Start from the database, for example MySQL: when you enter something, if the table has a primary key and this is numeric and increments automatically, i.e.: id int(10) primary key … -
Stopped Watching Assign Multiple Values to a Field and Display it on Web Page
I created a table in phpmyadmin and i was curious to know if it is possible to assign multiple values to one variable/field in the same table. For example here … -
Began Watching Assign Multiple Values to a Field and Display it on Web Page
I created a table in phpmyadmin and i was curious to know if it is possible to assign multiple values to one variable/field in the same table. For example here … -
Replied To a Post in Problem on notifying/alerting the user if the textbox is empty
Change the `IF` statement to: if($submit == 'submit' && strlen($service_name) > 0 && strlen($service_content) > 0) **@broj1** sorry, I didn't saw your answer, bye! -
Replied To a Post in php echo
The problem is given by the double quotes inside the date function, you're breaking the quotes of the echoed string, if you escape them then it will print the line … -
Began Watching Add IPv6 nameservers in Dedicated Server and WHM
Hello, first of all let me clarify that I am just a programmer but I needed a dedicated server , with no many modification so I bought an unmanaged dedicated … -
Replied To a Post in Talking to MySQL DB
The variable values, in this case, **must** be strings, so surround them with quotes: $dbhost = "sql.domain.tld"; $dbuser = "username"; $dbpass = "password"; The port value can be submitted as … -
Replied To a Post in Show Result In codeigniter while have 2 Template
> the result is not where it suppse to show in the $content or the $ourput Its showing in the header of the template I'm not sure I've understood your … -
Replied To a Post in Seasons Greetings - Happy Holidays etc
happy holidays! ^_^ -
Replied To a Post in php image upload secure
As I wrote in my previous post, this is not secure: $rooturl= "http://" . $_SERVER["SERVER_NAME"] . "/"; PHP documentation says: > SERVER_NAME The name of the server host under which … -
Replied To a Post in XML different levels
Yes, in the arrays you start to count from zero, you can see all the structure by using `print_r()`: print_r($file); -
Replied To a Post in Secure PHP encryption?
Sorry, check these links: * http://www.php.net/manual/en/function.mcrypt-encrypt.php * http://www.php.net/manual/en/mcrypt.examples.php And let say you're using this script: <?php $key = "this is a secret key"; $input = "Let us meet at 9 … -
Replied To a Post in XML different levels
The second xml file is not correct, here's the fixed version: <?xml version="1.0" ?> <sys> <major> <id>1</id> <point>Tower</point> </major> <major> <id>2</id> <point>Castle</point> </major> </sys> Now, you basically get an object … -
Replied To a Post in Secure PHP encryption?
Who knows :) But I would hazard by saying no. Let's say new technologies could speed up the decryption, or they could find a flaw in the algorithm, or they … -
Replied To a Post in Member counters recalculated
Ditto. I've lost ~50 posts (I was over 1500) and 28 points on reputation, but it's fine for me too. -
Replied To a Post in php image upload secure
Or, instead of: if($width > 2896) return false; if($height > 2896) return false; You could use: if($width * $height > 8388608) return false; Where `8388608` is `32*1024*1024/4` and allows much … -
Replied To a Post in php image upload secure
It seems fine, but I would fix few things. Change line `84` and `85` with these: $temp_image_path = $_FILES[$field]['tmp_name']; if( ! array_key_exists($field, $_FILES)) return false; $image_name = sha1($_SESSION['username']); With the … -
Replied To a Post in mysql installation error
No problem, I'm referring to this: * http://windows.microsoft.com/en-us/windows-vista/what-is-a-read-only-file-or-folder I'm sorry I cannot help much on this, but I don't have a Windows box right now, so I cannot test an … -
Replied To a Post in php image upload secure
You can use **Imagick:** $tmpfile = $_FILES['user_profile_image']['tmp_name']; $dest = './images/'.sha1($_SESSION['username']).'.png'; $img = new Imagick(); $img->readImage($tmpfile); $img->stripImage(); $img->scaleImage(100, 100, true); $img->writeImage($dest); $img->clear(); $img->destroy(); Where the first parameter in the `scaleImage()` method … -
Replied To a Post in share products on Facebook
Ok, I got it, it happens because you have to encode `&` in the query string, try with: echo rawurlencode("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); It should work fine. -
Replied To a Post in brick will not add brick +1
You're welcome! Yes, because the update query would return only the affected rows. So, the *complete* version would be: $stmt = $mysqli->prepare("UPDATE brick FROM goodship WHERE name = ?"); $stmt->bind_param('s', … -
Replied To a Post in Non-exe SQL to CSV-php converter
You can limit the access to the file by saving it outside the webroot, or if you cannot, by applying an .htaccess rule to limit the access to a path … -
Replied To a Post in Non-exe SQL to CSV-php converter
I don't know if there is anything in PHP, but there is a tool written in Python: * http://pythonhosted.org/querycsv/ Otherwise you can check the SQLite library, it's used with sqlite … -
Replied To a Post in brick will not add brick +1
You're using an array, so you have to surround it with parentheses, otherwise you have to escape the single quotes: mysqli_query($con,"UPDATE goodship SET brick=brick+1 WHERE id = {$_COOKIE['id']}"); In addition, … -
Replied To a Post in mysql installation error
In the link above there are few workarounds to override the issue, try to edit Windows register as explained and if it does not work wait for other answers, I … -
Replied To a Post in php to e-mail
IF you're using Windows, the `mail()` function will not parse emails in format `Name <email@domain.tld>`. Second use double quotes: $email = "{$_REQUEST['email']},{$_REQUEST['email2']}"; Otherwise you have to escape the array keys … -
Replied To a Post in php image upload secure
Ok, as you see you got the $_FILES array and the validation went through. Now this is yours: <?php if($_FILES) { $uploaddir = "./images"; $userfile = $_FILES['user_profile_image']; $allowed_filetypes = array('.jpg', … -
Replied To a Post in php image upload secure
Ok, check it, in the meantime this is my test: <?php if($_FILES) { $filename = $_FILES['user_profile_image']['name']; $allowed_filetypes = array( 'jpg', 'jpeg', 'jpe', 'png' ); $ext = strtolower(pathinfo(parse_url($filename, PHP_URL_PATH), PATHINFO_EXTENSION)); if( … -
Replied To a Post in php image upload secure
Do you mean you get the same error or is different? Can you show the name of the file? E.g.: `image.jpg`. Also, if this file is a PNG add the …
The End.