code-
$q="SELECT * FROM tbl_quevote WHERE que_id = '".$qid."' and voteby='".$uid."'";
$result = $mysqli->query($q) or die(mysqli_error($mysqli));
$num_rows = mysql_num_rows($result);
echo $num_rows;
Error:
Warning: mysql_num_rows() expects parameter 1 to be resource, object given in C:\xampp\htdocs\shizin\voting.php on line 13
how t...
Basically, I'm looking for a PHP framework which can help me to build a site similar to Stackoverflow. Is there any?
A website which can:
Let people post and answer questions
Let them vote
Let them choose the best answer
...
Hi,
Is it possible the saved text with different styles and colors in the image?
...
I have this for navigation, and when I switch to page 2, it will lose the &type=
Let's say I select "checked", the first page it shows fine, as it het the whole string,
but when I switch pages it loses... here's the code:
// navigation
if($_GET['start'] && is_numeric($_GET['start']))
{
$start=$_GET['start'];
$start=((int)($s...
ajax code-
xmlhttp.open("GET","voting.php?qid="+qid+"&uid="+uid+"&type="+type,true);
html-
<td ><img src="images/up.jpeg" style="border:none;" title="Like"
onclick="doVote('<?php echo $q_id; ?>','<?php echo $_SESSION['UserId']; ?>','up')"></td>
problem: qid is getting passed to voting.php page but uid and t...
I upload file = Plupload . I checked varibles $_FILES, $_POST, $this->data , all is empty and !isset
please help me
function mod_uploadImg($id = null){
if (!$id){
return false;
}
if (!empty($_POST)){
CakeLog::write('activity', 'file exist');
}
if (isset($_FILES['file'...
This is located in the sidebar.php file for predetermined adspace. I've tried putting the image URL and the link URL in separetely and by generated code, but I get an error every time. This is the code:
<div class="box"> <!-- Replace to your affiliate link -->
<a href="#"><img src="<?php bloginfo('stylesheet_directory');?>/images/...
I've created a custom node type in Drupal 7, using the hook_node_info method in the install file:
// declare the new node type
function foo_node_info ( ) {
return array(
'foo' => array(
'name' => t('Foo entry'),
'base' => 'node_content',
'description' => t('For use to store foo entries.'),
));
} // END function...
ajax-
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("lblvoteup").innerHTML=xmlhttp.responseText;
//document.getElementById("lblvotedown").innerHTML=xmlhttp.responseText;
}
}
html-
<tr>
<td ><img src="images/up.jpeg" style="border...
Hello,
There are thousands and thousands of questions about, "Which PHP framework is the best?".
While I find this very subjective, because everyone has framework that fits to him/her best, I also find that every frameworks has their downsides. I don't think on performance, I'm thinking about features you miss and how elegant your ...
Hello!
How are you supposed to create an autologin feature on your webpage using phpass as encryption of the passwords?
I mean, the way it checks the password is by giving the CheckPassword method the password in clear-text and a hashed string of that password (a previously stored hash that is). Then it returns true/false wheter its cor...
I am creating a web base application using PHP and MySQL. I want it to be able to save any kind of user input characters, both English and non-English characters like Arabic or Japanese at the same time.
What should I do to achieve that?
...
I have multiple Controller objects that either execute some script and then redirect to a specific page, or gather some data, send it to a View object and then display that View.
Instead of having a page for each controller instantiation (for example main_menu.php, image_browser.php, manage_users.php), I have an index.php page that cont...
Hi,
for example i have this html code:
<p><strong>Text text.</strong></p>
<p><span style="font-size: 14pt;"><span style="background-color: #ff0000;">Text text...</span></span></p>
Possible write this text with this style on the image (with php GD)?
Thanks
...
I have blocks of HTML code in a MySQL database and my framework needs to print these within a PHP template which will be outputted to the browser. To do so I make this call:
</tr>
<!-- Section 3 -->
<?php echo SIN_SiteView::get('section3') ?>
<tr>
Which gets the code either from the APC or MySQL, now the code it obtains looks ...
I'm using jQuery and $.post(). My code snippet is as follows for chat .php :
<?php
$msg=$_POST['msg'];
mysql_connect("localhost","root");
mysql_select_db("user");
mysql_query("INSERT INTO space (name,msg,serial) VALUES('Test','$msg','1')");
?>
and here is the code for my HTML file :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tran...
I have one file index.php, I am trying to include
splash.php when no variable is passed
and
display.php when any variable is passed.
This is what i have so far but i want to make it universal for all variables instead of just "query".
if (!isset($_REQUEST['query']))
{
include("splash.php");
}
else {
include("display.php");
}
...
How can I create a universal login system like stackoverflow?
http://stackoverflow.com/users/login in php?
I don't want to use Gigya, because I don't want their branding on my site
...
For my site, i would add a category system to organize content just like the drupal taxonomy.
Do something like this already exist?
...
I am wondering this because like many other sites, we have user-submitted images.
I have seen that my friends would send me a instant message that says "Look! I have a awesome picture of you at this party!" which lead me to believe they have some Malware on their computer because after speaking to them, they immediately sign off.
Of co...