in object oriented php mysqli
I am trying to request a username, and return if it matches a row, without actually returning any user data.
How would I write this?...so far I have...
$sql = "SELECT NULL FROM database WHERE usernick=?";
$stmt = $link->prepare($sql)
$stmt->bind_param('s', $snr);
$stmt->execute();
After this step I need...
http://i.imgur.com/foT9u.jpg
Using that image as an example, here's what I need to do:
Crop the blue square to have the same proportional ratio as that of the black square
From doing that, I should then be able to resize the blue square to fit into the black square without stretching it - It'll retain its proportions.
Note: The blue...
Hi all,
I'm new to Symfony and I'm going through the Jobeet tutorial v1.4 for
Doctrine. I am currently stuck on Day 3. I've followed all the
instructions on configuring the database and building models and
modules; however, when I try to access
"http://localhost:8080/frontend_dev.php" I receive the following
error:
'Configuration "conf...
I currently have a AJAX heavy(almost everything) intranet webapp for a business. It is highly modularized(components and modules ala Joomla), with plenty of folders and files. ~ 80-100 different viewing pages (each very unique in it's own sense) on last count and will likely to increase in the near future.
I based around the design arou...
Hi,
I would like to select a random line in my database. I saw this solution on a website:
SELECT column FROM table
ORDER BY RAND()
LIMIT 1
This SQL query run but someone said me that it was a non performant query. Is there another solution ?
Thx
...
I am trying to write php script which does some shell functions like reporting.
So i am starting with diskusage report
I want in following format
drive path ------------total-size --------free-space
Nothing else
My script is
$output = shell_exec('df -h -T');
echo "<pre>$output</pre>";
and its ouput is like below
Filesystem T...
I have a page on my web server that is PHP that is set to do this
if ($_POST['post'] == true) {
echo: 'hello, world';
}
I want to create a page that calls to that page, posts "post" equal to "true" and then returns the value "hello, world". I have a script that works, but only if the pages are on different servers. Unfortunately, bot...
So I am learning about javascript, so I am making a live chat system with PHP and javascript. I have it so the javascript refreshes the log (each message gets logged in a file on the server), and it refreshes every second. Im using firebug to monitor the resource usage, and I see under the net tab each times its updated, and the bytes ad...
hi!
I'm working on a project which includes generating pie and bar graph charts on the fly with user inputs.
Can anyone suggest me some good libraries to do that?
It can be any like jquery, css, php class or anything free..
And i'm going to use it mainly offline.
Thanks :)
...
i have an ASP web services to change byte array that given from the client and change it to a file and save it in the web server
...
Say my application has a "Posts" model, and one of the function is add_post(), it might be something like:
function add_post($data) {
$this->db->insert('posts',$data);
}
Where $data is an array:
$data = array ('datetime'=>'2010-10-10 01:11:11', 'title'=>'test','body'=>'testing');
Is this best practice? It means if you use tha...
Hi Friends,
Now currently i am working on a french social networking site. I have small problem in my site i.e., in my site there is module of albums , In this we can upload videos and photos. My client requirement is when we are displaying those photos and video's need to keep face book share.i wrote the code for both image and video b...
Hi I have to convert video files to .flv format in php. any body have any simple scripts please give me.
...
Hi all,
How can I achieve the following result in cakephp:
In my application a Topic is related to category, category is related to city and city is finally related to state
in other words:
topic belongs to category, category belongs to city , city belongs to state..
Now in the Topic controller's index action I want to find out all t...
Hi,
How do I run PHP Security Scanner and SpikePHPSecAudit?
I've already extracted them at the root of my website and thought it could be run like phpSecInfo where you just navigate to
www.mySite.com/phpsecinfo/index.php
Any assistance will be appreciated.
ps I am using Windows XP and XAMPP
...
Hi,
Being quite new with PHP, I cannot find any solution why this does not work. The query is OK and the resource is returned. But I dunno why fetch_assoc does not print values. Thanks
$query=sprintf("SELECT ID,NAME FROM USERS WHERE PASS='%s' AND NAME='%s'",mysql_real_escape_string($p),mysql_real_escape_string($n));
$result=mysql_query...
What I am looking for currently is a simple, basic, login credentials sanitation script.
I understand that I make a function to do so and I have one...but all it does right now is strip tags...
am I doomed to use replace? or is there a way i can just remove all special characters and spaces and limit it to only letters and numbers...th...
Hi guys. Long time viewer, first time question asker.
I'm trying to have my personal website parse through my mail box for attachments from a certain subscription list, and then be able to view the PDF attachments as images, preferably jpg.
With the help of this: http://www.linuxscope.net/articles/mailAttachmentsPHP.html
I'm currently...
My Pop window displays Horizontal scroller, how to remove it? I am using Mozilla 3.6.3, PHP in Windows, I have an anchor tag with href as given below:
<a href="javascript:popupWindow('http://example/english/images/buttons/button_invoice.gif"></a>
but when I click on this link my pop window is displayed with a horizontal scro...
Hi,
I have been working with C# so this is quite strange for me:
while($variable=mysql_fetch_assoc)
{ $X=$variable['A'];
$Y=$variable['B'];
}
If it is like an ordinary loop, then X,Y will be reset with every loop, right?
I have not been able to look up in PHP manual how it works. I guess that in each loop it advances to ...