veedeoo 474 Junior Poster Featured Poster

Personally I think Python is better then ruby because it runs on the Django framwork and it can do more.

I do respect your affinity to Python. However, why is it that you only mentioned Django framework and not a single framework for Ruby. Have you ever tried writing web applications in Ruby utilizing these frameworks?

Padrino, Ramaze, NYNY, Sinatra, Nancy, Hobbit. I could go on and on with the list. Please feel free to let me know if you need more and I'll give you 6 to 8 more

Do you know how easy it is to write an application utilizing those mini frameworks I have mentioned above vs. writing a python web application in Django framework? The argument should not always focus on which language is better. Some languages are better on specific application, while others can't just deliver the anticipated results.

Before crossing to the Ruby side of Daniweb, make sure to do some research first about this subject.

I wrote applications in Python utilizing Django, the same application I wrote in Ruby under Padrino. I wrote the very same application in PHP with three different frameworks namely Symfony2, CodeIgniter, and Fuel PHP. Still, I am not sure which one is better. The reason is that all of them did the job as I expected them to be. However, if someone will ask me, if I can write the same application I wrote in PHP in different language, then my answer would be yes, but …

veedeoo 474 Junior Poster Featured Poster

I understand that you can use c# with it to develop web apps, but I can already do everything I need and more in a webapp with python and sometimes ruby.

but those languages that you mentioned are among of the .NET languages e.g iron python, iron ruby and C# . It appears to me that you can do pretty much everything on them, you should not have any problem.

As far as

"Is ASP.NET a good language to know for web development",

ASP.NET is not a language. It is rather stands for Active Server Page or to make it short and easy to remember it is a framework that can work with the .NET languages. I highly favor C# over iron python and iron ruby, only for the reason of better community support.

I hope I did not create any confusion..

veedeoo 474 Junior Poster Featured Poster

I'm done with theory portion.

The theory portion should have given you enough information to at least create some simple codes on a notepad++ or visual basic express. We always treasure members who love to share their codes regardless if it right or wrong. We are here to help you, but you will have to have to do your part.

veedeoo 474 Junior Poster Featured Poster

the only work around for this is to compile the .exe in the OS running the server e.g. linux, ubuntu, and others.

for example, you have an executable application called app_x.exe, you need to compile it from the source inside your server's OS.

Once it is installed, you reference the location e.g. usr/local/bin or usr/bin/local/app_x

The PHP code for it will be something like this

exec("app_x ## put other stuffs here e.g. input  2>&1" , $output_from_program);

foreach($output_from_program as $item){

    echo $item .'<br/>';

    }

It will be difficult and tedious, but not impossible to do this on Apache2 on windows. On windows, you can compile by using MingGW.

veedeoo 474 Junior Poster Featured Poster

this

 public static static_method(){
    return $this->var2;
    } 

should read

 public static function static_method(){
    return $this->var2;
    } 
veedeoo 474 Junior Poster Featured Poster

Before addressing your problem, please allow me to point out minor problem with your class. It might be minor now because like you said it is working on the other site that you know, but it can be a major problem sooner than later.

The upload class was written for the old PHP version with backward compatibility for the PHP 4.x.x versions. I don't think there are many servers these days still running on 4.x.x version.

The solution is to rewrite it to PHP 5.x.x compliant class. I know some readers coming from other languages would say "What the _ell Veedeoo is talking about?". This may sound like a Bull _hit to a few practitioner of the laguage, but I am pretty sure it is not. I will not waste my precious time typing all these crapola just for the purpose of delivering my BS. I don't do that kind of stuffs. My time is important as much as I value the time of others reading my opinions, analysis and suggestions on the subject matter before me.

Classes written in PHP with backward compatibility was written similar to the class written in JAVA. There is no constructor. The constructor rules in the old PHP version was to create a method with the same name of the class itself.

The old way

class MyClass{

    var $var1;
    var $var2 = 'var two';
    var $var3;

    function MyClass(){
        $this->var1 = $var1;
        $this->var2 = $var2;
        }

    function method1(){

       return $this->var2;

   }    
 }       

Class variable …

veedeoo 474 Junior Poster Featured Poster

you may want to use php datetime object.

veedeoo 474 Junior Poster Featured Poster

you can redirect the user to the same page after if passes the validation

header(location:http://www.yourdomain.com/form_page.php);
exit;

You can use javascript to clear the form values, but that will not clear the $_POST data.

veedeoo 474 Junior Poster Featured Poster

try replacing the $_SERVER['DOCUMENT_ROOT'] with the relative directory.

veedeoo 474 Junior Poster Featured Poster

Upload is not working because your php.ini settings for the upload related directives are pretty low.

Can you copy, past, save as info.php

<?php

    phpinfo();

direct your browser to this page. On this page, look for the Server API directives or value.

is it fast CGI?
or is it Apache 2.0 Handler?

Also, look for the value of this

**Loaded Configuration File **

Give me those values and I will tell you what to do next.

veedeoo 474 Junior Poster Featured Poster

okay guys, I am on break :). it is around 1:18 AM in my time zone and I am just taking the 20/20 break :). Then I will eventually hit my bunk bed..

The purpose of this post is to show my fairness to other languages of choice as mentioned by the Prateek_2. Again, my comparisons are focused on Web applications and I am not taking any desktop application into consideration. Otherwise, this will be covered on the software development forum of which I am also glad if I am given the chance to explain my take between the JAVA and C#. Obviously, I will take both.

Now i want to built some business type application like ERP

I have given him the EPESI

and i am confused which language to choose ASP.NET or java

I have given him examples of PHP based on his requirements. I hope :).

Let's take a brief look at the simple language constructs of these three languages at it applies to Web applications Enterprise or Just a plain personal page. For web applications, JEE (Enterprise edition) is highly favored instead of the regular JSE ( Standard Edition). While for the ASP.net it can be either C# or VB running on RAZOR mark-up Syntax where the full MVC design patterns can be utilized.

The Console Vs. CLI (PHP). Demonstration of a simple Hello World

JAVA

package com.test.model;

public class TestingJava {

    public static void main(String[] args){
        String sayit = ("hello wordl!"); …
veedeoo 474 Junior Poster Featured Poster

Sounds like phalcon, I was meaning to evaluate that but was put off by the fact it needs to sit on its own dedicated

There you go Iamthwee. Yes, that was Phalcon, you are right. I can't remember its name, a horse image keep on showing up on my head for memory key, but I am sure the name wasn't from anything like a horse :).

I know I am bit biased :), I am sure if he ever posted his question on the ASP.NET side, I would give the same response utilizing the dotnet showing the strenght of either VB or C# in MVC environment. Since the question is on the PHP side, I need to bring-up some other things that the PHP is capable of outside the echo "Hello World".

The same determination I have, if ever this question was posted on JAVA or Python forum, I will probably have come up with something.

I also put the language what the OP already knows, instead of sending him to go out and learning how to code in JAVA, VB, and C's. The OP wants to have a SAP support and the ERP kind of application. Zend is probably a struggle to be able port to the ERP. The most feasible is to be able to use the OP's previous knowledge in CI and use the ready made ERP called EPESI and just port it to CI.

And of course, OP can effeciently do this in dotnet, …

veedeoo 474 Junior Poster Featured Poster

try this

if($_FILES['image']['name'] != ""){
$filename = $_FILES['image']['name'];
$ext = strrchr($filename,".");

//$imagename = $student_id;
//$imagename .="_". $filename;
if($ext ==".jpg" || $ext ==".jpeg" || $ext ==".JPG" || $ext ==".JPEG" || $ext ==".gif" || $ext ==".GIF"){
$size = $_FILES['image']['size'];

if($size > 0 && $size < 1000000){
$archive_dir = "images";
$userfile_tmp_name = $_FILES['image']['tmp_name'];

    if(move_uploaded_file($userfile_tmp_name, $archive_dir .'/'. $student_id .'_'. $imagename .'.'. $ext)){
veedeoo 474 Junior Poster Featured Poster

copy, paste and save as inisettings.php

<?php

echo 'Maximum Execution Time : '. ini_get('max_execution_time').'<br/>';
echo 'Maximum Input Time : '. ini_get('max_input_time').'<br/>';
echo 'Upload Max File size : '. ini_get('upload_max_filesize'). '<br/>';
echo 'post_max_size : '. ini_get('post_max_size') .'<br/>';  

direct your browser to this file post the result on your response.

veedeoo 474 Junior Poster Featured Poster

wow, this is pretty scary. I have been sitting in front of my computer for long hours since I was 9 years old. Now, that I am an adult :) I am sitting until 4 AM finishing projects.

My eyes can no longer be save, I am wearing prescription glasses ( I mean thick glasses) over contacts. Without glasses, I am pretty much blind. I think lasik eye surgery is my only option.

veedeoo 474 Junior Poster Featured Poster

First, you will have to install wordpress on your server and then read this tutorial. Good luck to you.

veedeoo 474 Junior Poster Featured Poster

Hi,

You can try paypal API here. The implementation is fairly easy. Just make sure to sign up for your Paypal sandbox account for testing.

On the sandbox, you create the seller and buyer accounts.
Create a page with test products similar to your actual production site.
Call the api and start testing by doing transactions.
Check the sandbox if the transaction went through.

Test a few more times and look for any glitches or something that may cause a problem. You can either post your questions here on daniweb or do it on the github. If you want me directly respond to your questions, then post it here on Daniweb. You will have a better chance of getting a response from me here that anywhere else.

veedeoo 474 Junior Poster Featured Poster

There are some strenghts that are unique to codeIgniter, Zend, Laravel and many others.

Months ago, we were telling people about the diminishing codeIgniter before the eyes of its creator. However, I was really surprised with the release of the version 2.2.0. So, I guess I can recommend CI again.

For example, let say we have a medium size corporation with 5 different entities. If we want to manage these entities from ONE backend application we can utilize epesi as shown below

3ed5b1ab8a3f84634ef77d88d0f1ab1f

We can make epesi to be the corporate headquarters. We can gather reports, activity logs, trasactions, and all these good stuffs from all the 5 entities.

Now, let us go down to the entities. Let say each of them, have their own products completely different from one another. We want these entities to have their own websites. What framework should we use?

My response is codeIgniter. Why CodeIgniter? Here is why. Let say entity one sells mobile phone, entity two sells shoes, entity three sells outdoor gears, entity four sells furnitures, entity five sells used clothings. Generating a report is not a problem with Epesi, we can pretty much modify the script to accomodate any requrements.

How can achieved this in CI? Actually, this is pretty easy to achived in CI because you can create your on library specific to your needs.

Say we are to create the entity one library

<?php

    class EntityOne{

        public function __construct(){
            $CI =& get_instance();
        }

        public function …
veedeoo 474 Junior Poster Featured Poster

change this

if(move_uploaded_file($userfile_tmp_name, "$archive_dir))

to this

if(move_uploaded_file($userfile_tmp_name, $archive_dir ."/". $LRCardname.$ext))

another alternative is to do it like this.

if(move_uploaded_file($_FILES['image']['tmp_name'], $archive_dir ."/". $LRCardname.$ext))
veedeoo 474 Junior Poster Featured Poster

Is it possible to integrate SAP with php ??

There was a book entitled SAP Developer's Guide for PHP. PHP can also work with SAP HANA.

Also i want to integrate crystal reports (I heard about this from my senior) in php. Is that possible ???

Yes, all you need to do is install a JavaBridge. I already talked about JavaBridge in one of my post long time ago.

Is MySQL (which i mostly used along with php) realiable enough for business solutions, which is quite large.

For high-end business applicationm, I don't see any limitation on MySQL. However, PDO extension support multitude of databases like
Cubrid
FreeTDS / Microsoft SQL Server / Sybase
Firebird
IBM DB2
IBM Informix Dynamic Server
MySQL 3.x/4.x/5.x
Oracle Call Interface
ODBC v3 (IBM DB2, unixODBC and win32 ODBC)
PostgreSQL
SQLite 3 and SQLite 2
Microsoft SQL Server / SQL Azure
4D

In addition, there are many excellent ORM for PHP e.g. Propel, Doctrine, and another one that I can't remember its name. I know Laravel uses Eloquent, but that's not it though :).

When you were using CodeIgniter, have you tried using the codeIgniter's Active records? That's pretty simple library not even close to the latest ORM, but it can handle some pretty serious loads. How about codeIgniter's transaction table safe?

below is a screenshot of a database with a little more than 1.3 million rows. …

veedeoo 474 Junior Poster Featured Poster

Check for corrupted files and proper files and directories permission.

veedeoo 474 Junior Poster Featured Poster

There is also an ERP applications written in PHP e.g. epesi, web ERP, and some more here ( not all PHP, but you should be able find PHP.

ASP.net is not a language itself it is a framework that can take VB, C#. It will be your language choice either VB or C#? Which one can you do?

I have no disagreement with the usage of JAVA. IMHO, you choose the language you feel very comfortable with. I am not saying that we should not try or learn other languages, but to built a pretty big project while learning the language just does not equate to successful product.

You have mentioned above that you already have 2-3 years of PHP and some time in CodeIgniter. That alone have already given you enough experienced on how to write high quality codes in PHP.

PHP is much better now than 3 years ago. Also, there is a secret project called PHP New Generation or PHPng. If you haven't heard about it, this is something you might want to research and the latest Hack from facebook.

If I need to choose which language other than PHP, I would go for Python on Django framework. Otherwise, I would rather stay and continue to write application in PHP and wait for the announcement of the big one.

Again, the final choic is yours. I have already given you my opinion on this.

veedeoo 474 Junior Poster Featured Poster

Close your eyes and open your mind.

Should solve the puzzle.

veedeoo 474 Junior Poster Featured Poster

Hi,

I know this is 6 years old post, but if you want a fix for a 6 years old post, please read below.

Here is a good tutorial . It is an old one, but I will give you the fix for it.

copy the code shown on david's website and find this

//cycle through

right below that line add

$return = '';

scroll down the page and look for while loop as shown below..

while($row = mysql_fetch_row($result)){

            $return.= 'INSERT INTO '.$table.' VALUES(';
            for($j=0; $j<$num_fields; $j++) {

                $row[$j] = addslashes($row[$j]);
                $row[$j] = ereg_replace("\n","\\n",$row[$j]);
                if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; 

                } 

change the above codes to this

while($row = mysql_fetch_row($result)){

$return.= 'INSERT INTO '.$table.' VALUES(';

    for($j=0; $j<$num_fields; $j++){
         $row[$j] = addslashes($row[$j]);
         $row[$j] = preg_replace("#\n#", "\\n", $row[$j]);

        if (isset($row[$j])){

                $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; 
        }
        if ($j<($num_fields-1)){ 
                $return.= ','; 
        }
    }

    $return.= ");\n";
}

Save the modified codes and you are done.

Don't forget to call the function and provide your database credentials.

/* backup the db OR just a table */
function backup_tables($host,$user,$pass,$name,$tables = '*')

DO NOT! Change the $tables = '*'

veedeoo 474 Junior Poster Featured Poster

Hi shrutisk welcome.

veedeoo 474 Junior Poster Featured Poster

you can start here and practice on these templates.

veedeoo 474 Junior Poster Featured Poster

If your boss is delegating this responsibility to you, I believe you should ask him to at least buy you a Cisco Packet tracer and practice on it. You can troubleshoot the firewall rules. You can also analyze access list, IP, ports, NAT and many other good things that may sound pretty foriegn to you.

prett much you can have the overall idea on what is going on.. kind of like the attached screenshot.. it is not a pretty good network design, but you should get the idea on how to make things up in packet tracer.

61938f8ab1afe43855873e3a77ddf337

veedeoo 474 Junior Poster Featured Poster

there are many tutorials and readily available scripts out there.

There is one here. It is an old one, but it should be able to do the job. I was planning to make an update, but the original owner won't repond to my requests.

veedeoo 474 Junior Poster Featured Poster

PHP is one of the best web platform and we want it to stay that way.

veedeoo 474 Junior Poster Featured Poster

Is there any way of finding if the email has been sent?

Hold on.. I have an idea. Change the bottom part of your code to this..

 echo(mail($usr_email, "Login Details", $message,
"From: \"Member Registration\" <admin@mysite.com>\r\n" .
"X-Mailer: PHP/" . phpversion()) ? 'Email Sent' : 'Email not Sent');

## we don't want to redirect for now. All we want to check is the status.
 //header("Location: thankyou.php");
    //exit();

Let me know what is the response you are getting...

veedeoo 474 Junior Poster Featured Poster

I favored the hybrid of both approach. When you move to a new server, you can zip the files and off you go.

veedeoo 474 Junior Poster Featured Poster

line 11, should read

if(move_uploaded_file($userfile_tmp_name, $archive_dir)){
veedeoo 474 Junior Poster Featured Poster

Because I am way so much younger than the majority, I can't say much about my experiences in life. However, why worry about age? I thought humans are like fine wine, we get better with age :).

veedeoo 474 Junior Poster Featured Poster

davy_yg,
Common man, you been writing application all these years. I know you can do it.

Here is an example of a basic table structures of a internal PM system. Similar structure I used on the codeIgniter Library I wrote in the past.

here we go :
Table Name: messages

CREATE TABLE IF NOT EXISTS `messages` (
  `message_id` int(11) NOT NULL AUTO_INCREMENT,
  `m_title` varchar(255) NOT NULL,
  `message` mediumtext NOT NULL,
  `message_type` varchar(100) NOT NULL,
  `sender_email` varchar(255) NOT NULL,
  `sender` int(10) NOT NULL,
  `sender_name` varchar(255) NOT NULL,
  `recepient` int(10) NOT NULL,
  `rec_time` int(20) NOT NULL,
  `read` varchar(10) NOT NULL,
  PRIMARY KEY (`message_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=35 ;

I don't have much time to reassemble these, but I will provide you with the screenshots I believe you will need to get this done.

First, you need to have a class to retrieve the messages and deliver them to the member's inbox.

it should look something like this

ffb06625294781987399b4c10563ba26

as you can see the trash bin on the right is triggered through ajax. The message compose page

624cd350eb6b652a47011ac107486a99

To send a message you need to collect the form data and reference to them.

veedeoo 474 Junior Poster Featured Poster

Android Apps are pretty much written in JAVA compiled in android SDK. The only thing that the PHP can help achieving the mobile apps is to provide the API in the form of RSS or XML. Even so, XML and RSS are not always a good source of data. What I have seen in the past was a complete parsing of the URL and the harvested data are then translated into the JAVA compliant xml file.

There is an rss feed reader on github of which I believe can help you start with this project. The script will read any rss feed from daniweb.

You can pretty much make this work by downloading the Android SDK or the Android STudio and then just import the source codes from the linked git hub source codes above.

veedeoo 474 Junior Poster Featured Poster

It all depends on the quality of codes you can deliver. If you can write an application pretty close or at least at the same quality as the application written in Django framework, you can get paid pretty high. In my area, the minimum Object Oriented Programmer with MVC framework experience have a minimum starting salary of 65,000 dollars per year. But that's pretty low I think.

I know it is unfair, but for procedural programmers, they get paid around 10 to 20 thousand dollars less.

There is no Doubt PHP is a great language. Over the years, it has proven itself to the world that it can move forward and it can continue to evolve for the better. However, PHP is the only language where anyone can call themselves as a programmer after few hours of exposure to the language.

In my Humble opinion, there are many levels of PHP programmers and developers. I just made all these level for myself, because I went through all of these levels.

  1. The first group are the mixers ( the spaghetti coders as we call them).

  2. The hammer bearers. After learning how to write a reusable functions, they focus more in using all functions on pretty much everything.Everything to them looks like nails.

  3. The separatists. These are the more advance programmers that does not believe in the mixing of the business logic and presentation logic.

  4. The object orienters. These are the second level of advance programmers who want to take the separation …

veedeoo 474 Junior Poster Featured Poster

We can pretty much do anything with PHP :). Just the thought of it, makes you feel proud writin high quality codes in PHP.

veedeoo 474 Junior Poster Featured Poster

Yes, it is possible in Phalanger and ASP.net environment.

I lifted these codes from this website.

<b>Camels created: </b><?= Class1::$CamelsProcessed ?><br/>
<b>Previous camel: </b><?= Class1::$LastCamel ?><br/>

<?php
    $x = new Class1;
    $growncamel = $x->MakeCamelFromGet(); // $x->Camel( $_GET['babycamel'] );
    if ($growncamel):
    ?><h2><?= $growncamel ?></h2><?
    endif;
?>

Noticed, how seamlessly the PHP instantiate the C# class named Class1? I think that is pretty cool...

veedeoo 474 Junior Poster Featured Poster

Honestly, active record method

insert()

will only return boolean true or false after the query has been executed. If you want to make sure that the response is taking into consideration then, I strongly suggest for you to use transaction.

Pretty much you probably need to do the transaction manually.

veedeoo 474 Junior Poster Featured Poster

Your form tag is way above the <body> tag. It should stay below the <body> tag. There are many great websites out there where you can read about proper html syntax.

remove form tag in line 3 and replace the form tag in line 19.

On your form.php, Replace this

<input type="submit" value="Login" id="login">   

with this

<input type="submit" value="Login" name="login" id="login">   

replace

if(isset($_GET['login'])){

## codes here

}

with these

if(isset($_POST['login'])){

    ## codes here responsible for login validation

    }

    elseif{

            ## remind the user of any error 

       }

    else{

        ## show them the login form or redirect to the login page

        }

pretty much those are the basics...

veedeoo 474 Junior Poster Featured Poster

Exactly, you don't fetch the password from the database using the user's password input. Only the user's inputted username.

Example: Make sure to use PDO or Mysqli. In this example, I will use shorthand PDO. Please make sure to follow the long form PDO connector suggested in PHP.net website

$username =  trim(filter_var($_POST['user_name'],FILTER_SANITIZE_STRING));
$password = trim(filter_var($_POST['user_name'],FILTER_SANITIZE_STRING));

## check the existence of the user in your database

$this_db =  new PDO('mysql:dbname=db_name;host=db_host', 'db_user', 'db_pass');

$this_stmt = $this_db->prepare("select  UserID, Username, Password FROM users WHERE Username = :username");

$this_stmt->execute(array(':username' => $username));
$res = $this_stmt->fetch();

## validate the password given by user

if(password_verify($password, $res['password'])){

        ## password is valid
        ## you can set the session here for logged_in and username
        ## $_SESSION['logged_in'] = true;
        ## $_SESSION['username'] = $res['Username'];
}
else{

       ## password is not valid, you can redirect to login page again.

}

don't forget to put session_start()....

veedeoo 474 Junior Poster Featured Poster

Hi, welcome :)

veedeoo 474 Junior Poster Featured Poster

Actually they are not hard to find. Here is one good example . The integration can be found here.

If you want to use paypal, you can use this. The example scripts are already included. I tested this on my paypal sandbox 10 months ago, and I can pretty much confirm that it is working.

Before processing real payments, make sure to test your scripts in the sandbox. Paypal have an excellent sandbox for you to practice. In fact, you can create both the seller and the client accounts in the sandbox.

veedeoo 474 Junior Poster Featured Poster

How many images are allowed per student?

More than one?
you need to create an image database table

+-----+----------+---------+
+ id  + owner_id + img_url +
+-----+----------+---------+

one only?
follow the recommendation above.

veedeoo 474 Junior Poster Featured Poster

Just another deviation of the two proposed solutions above on a single loop.

$string = 'string1-1/string2-2/string3-3';

$array_string = explode('/',$string);

foreach($array_string as $items){

        $item = explode('-',$items);

        echo 'Item : '. $item[0].'  Price:  '.$item[1].'<br/>';

}

returns

Item : string1 Price: 1
Item : string2 Price: 2
Item : string3 Price: 3

you just need to initialize the array as shown on Broj1 and Hakeemtunde responses.

veedeoo 474 Junior Poster Featured Poster

just wondering, what is the purpose of for loop and increment? Is it for speed or for some other reason/s?

veedeoo 474 Junior Poster Featured Poster

I believe this is not something you can achieved without the help of a Payment Gateway through API e.g. paypal, echeck.net, evp snap and many others.

In creating this type of application, the first thing that should come up for consideration is "Liability". It is always nice to have a middle gateway or company who can absorb any liabilities incurred by either party just in case..

veedeoo 474 Junior Poster Featured Poster

@hallianonline,

Cereal, have provided more than enough to solve your problem and if you need more please follow link below..

another one for you. The answer to your question is located about 3/4 down the page.

This is only an example and you may need to research the codex for other stuff related to this subject matter.

before this

while( $posts->have_posts() ) : 

you need to set your arguments to something like ..;

$your_sort_requirements = array(

                            'order' => 'ASC',
                            'orderby' => 'whatever_you_want'.
                            ## define more here as you want
                            );


## and then you create an instance of the WP_query as mentioned on the codex.

$this_is_now_your_post_query = new WP_Query(  $your_sort_requirements);

since it is now your query, we can pretty much do this

if($this_is_now_your_post_query->have_posts()){

    while( $this_is_now_your_post_query->have_posts() ) : 

    ## do as what a good wordpress developer should do here..

    }
hallianonline commented: perfect +2
veedeoo 474 Junior Poster Featured Poster

you can try using the absolute or relative url of the image or try adding

file://

## or

file:///
veedeoo 474 Junior Poster Featured Poster

password_hash for PHP version 5.5.x can verify the password from the user's input.

for example, we have user submitted form data

$password = $_POST['password'];
$username = $_POST['username'];
## don't forget to sanitize everything.

$your_query = "select username, password from USER_TABLE WHERE username = '".$username."'";

## execute your query  here and fetch the result



## and let hashed_pass equal to the row password

$hashed_pass = $row['password'];

## verify the password

if(password_verify($password, $hashed_pass)){

    ## password is valid

    }

    else{

        ## password is not valid

        }

The most important is that the $password from the user's input is not being included in the database query. The verification is occuring in the password_hash function and not in the database query itself.