Bachu 45 Newbie Poster

I created custom post type with custom taxonomy. Its working, but i am facing one issue is

http://example.com/taxonomy-slug/%term%/post-title 

this is my custom post type url

exg:

http://example.com/products/cars/bmw-z4

Here

products -> taxonomy-slug

cars -> taxonomy-term

bmw-z4 -> product title

custom-post-type slug -> products/%custom_taxonomy%

this link is working, but also its working when i change taxonomy term value

Exg: http://example.com/products/crs/bmw-z4

This link also working even after changing(cars -> crs)/puting any value at that position. Actually it should be redirect to page not found page.

Bachu 45 Newbie Poster

Try this

Click Here

Bachu 45 Newbie Poster

Try this

<html>
<body>

<?php
mt_srand((double)microtime()*1000000);
//Een bijzondere aanpak voor het vullen
function Vullen()
{
    $getallen = array(0,1,2,3,4,5,6,7,8,9);
    shuffle($getallen);
    return $getallen;

}

$getallen = Vullen(); 

//De functie display is om de getallen aan de rijnummers te koppelen: dus 1 + 0 t/m 9 voor rij 1 en 2 + 0 t/m 9 voor rij twee etc
function display($getallen){
    $table = '<table  border="1px" cellpadding="1px">';
    $bingokaart = array();
    for ($row = 1; $row < 7; ++$row){
$columnCount=0;
        $bingokaart[$row] = array();

        $table .= '<tr>';

        //Hier print je de getallen en de rijen : Echter nu 6 rijen en 10 columns!
        foreach ($getallen as $number){

        //for rownumber? Here it goes wrong? Now it prints on each row three times the number
           /* for ($rownumber = 0; $rownumber < 3 ; ++$rownumber ){*/
                if($columnCount<6){
                $bingokaart[$row] = $row .$number;  

            $table .= '<td>'.$bingokaart[$row]  . '</td>';
                    }

                    /*}*/
                    $columnCount++;
        }

        $table .= '</tr>';
    }
    $table .='</table>';

    echo $table;
}

display($getallen);

?>

</body>
</html>
Bachu 45 Newbie Poster

Try this example
Click Here

Bachu 45 Newbie Poster

Painful in php as a round trip to server and page reload required each time.

This can be done easily in js.

I suggest do this as @diafol said

If you want to do this with only PHP and HTML, you have to submit your page on each actions, ie when you submit your number and reset your value. That takes to load page again and again. Try the below example:

<html>
<body>
<?php
$result = 100;
if(isset($_POST['hdnValue']) && isset($_POST['txtValue'])){
    $result = $_POST['hdnValue'] - $_POST['txtValue'];
}
?>
<h1><?php  echo $result; ?></h1>
<form action="#" method="post">
<input type="hidden" value="<?php  echo $result; ?>" name="hdnValue" />
<input type="text" name="txtValue" />
<input type="submit" value="Enter" />
</form>
<form action="" method="post" >
<input type="submit" value="Reset" />
</form>

</body>
</html>
Bachu 45 Newbie Poster

Replace your display Function with this code. You missed to put <tr> tag in your table

function display($getallen){
 $table = '<table  border="1px" cellpadding="1px">';
 $bingokaart = array();

 for ($row = 1; $row < 7; ++$row){
     $table .= '<tr>';
     //iets met rijnummer doen en deze printen?
        foreach ($getallen as $number){
        $table .= '<td>'  .$row .  $number .'</td>';
    }
    $table .= '</tr>';
 }

  $table .='</table>'; 
echo $table;  
 }
Bachu 45 Newbie Poster

I did this with the help of below links
Click Here
Click Here

Why did you still using this 'mysqli_connect_error' ?

Bachu 45 Newbie Poster

Try this
Click Here

Bachu 45 Newbie Poster

Check this link
Click Here

You will get some idea ...

Bachu 45 Newbie Poster

Did you try Inline Styles in your HTML code like

<?php


$html = '
<h1 style="font-family: DejaVuSansMono, monospaced; font-size: 10pt;"><a name="top"></a>mPDF</h1>


';


//==============================================================
//==============================================================
//==============================================================

include("mpdf/mpdf.php");
$mpdf=new mPDF('C','','10');

$mpdf->WriteHTML($html);
$mpdf->Output();
exit;

//==============================================================
//==============================================================
//==============================================================


?>

If you are using seperate fonts like which are not in mpdf, you have to add this new fonts to in a stylesheet (CSS). Then you embed this style to your mpdf class.

Exg:

$stylesheet = file_get_contents('yourstylesheet.css');
$mpdf->WriteHTML($stylesheet,1);    // The parameter 1 tells that this is css/style only and no body/html/text

$mpdf->WriteHTML($html);

$mpdf->Output();

exit;

For more details Click Here

Here you can download mpdf package, they provide lot off examples.

Thank You.

Bachu 45 Newbie Poster

Use FB APIs

Click Here

Bachu 45 Newbie Poster

Check this Click Here

Bachu 45 Newbie Poster

Change this

$uid = $connection->insert_id();

To

$uid = $connection->insert_id;

Check this Click Here

Bachu 45 Newbie Poster

Try this

Click Here

Bachu 45 Newbie Poster

Replace

$command = "UPDATE ab_staff SET `slot` = '$slot_time' WHERE `id` ='$member_slot_3'";
$result = $wpdb->get_results($command); 

this code with

$wpdb->update('ab_staff', array( 'slot' => $slot_time), array( 'id' => $member_slot_3));

For reference Click Here

Bachu 45 Newbie Poster

@fireburner29, You can also redirect it to the same page.

check this session value $_SESSION['sess_userrole'], before you print the details. Means that if its value is admin, print the admin details. Else print
the normal user details.

Bachu 45 Newbie Poster

For Example,

Click Here

Bachu 45 Newbie Poster

Check this link Click Here.

Bachu 45 Newbie Poster

This code is working on my PC.

<script>

    function calculateText(el) {

var form = el.form;
var idx = form.Selfrating1.selectedIndex;

    if (idx <= 0) {
    form.reset();
    return;
    }
    if (form.Selfrating1.value == "Good") {
    form.T11.value = "#008000";
    } else if (form.Selfrating1.value == "Satisfactory") {
    form.T11.value = "#9ACD32";
    } else if (form.Selfrating1.value == "Mixed") {
    form.T11.value = "#FFFF00";
    } else if (form.Selfrating1.value == "Problematic") {
    form.T11.value = "#FF0000";
    }
    }

</script>

<form>
<p>a.i.Self Rating(1st Rating): <select name="Selfrating1" onchange="calculateText(this)">

    <option selected>Please select an option</option>
    <option value="Good" >Good</option>
    <option value="Satisfactory" >Satisfactory</option>
    <option value="Mixed" >Mixed</option>
    <option value="Problematic">Problematic</option>

</select>
<input type="color" name="T11" onchange="calculateText(this)"></p>
</form>

Which browser/Version you are using ?

Bachu 45 Newbie Poster

Wrap your code with form (<form></form>) tag.Like

<form>
<p>a.i.Self Rating(1st Rating): <select name="Selfrating1" onchange="calculateText(this)" value="<?php echo $row['Selfrating1']; ?>">

    <option selected>Please select an option</option>
    <option value=Good <?php if($row['Selfrating1']=='Good') { echo "selected"; }?>>Good</option>
    <option value=Satisfactory <?php if($row['Selfrating1']=='Satisfactory') { echo "selected"; }?>>Satisfactory</option>
    <option value=Mixed <?php if($row['Selfrating1']=='Mixed') { echo "selected"; }?>>Mixed</option>
    <option value=Problematic <?php if($row['Selfrating1']=='Problematic') { echo "selected"; }?>>Problematic</option>

</select>
<input type="color" name="T11" onchange="calculateText(this)"></p>
</form>
Bachu 45 Newbie Poster

Use Insert query for save data into your DB Table.

I couldn't find any insert query in your code.

I found a select query only. Select query is for to retrive data from DB table.

Bachu 45 Newbie Poster

Check the below example.

In index.php

<script src="//code.jquery.com/jquery-1.10.2.js"></script>

 <?php

$numberOfUser= 6;
$recordLimit = 5;

?>

<select id="userSelect">
<option value="">---Select User---</option>
<?php
for($i=1;$i<=$numberOfUser;$i++){
    echo <<<EOD
        <option value="$i">User-$i</option>
EOD;
}
?>
</select>


<div class="result">
<h3>Please Select A User</h3>
</div>

<script type="text/javascript">
$(function(){
    $("#userSelect").change(function(){
        var userOrder =$(this).val();
        $.post('request.php',{order: userOrder, numberOfUser: '<?php echo $numberOfUser; ?>', limit: '<?php echo $recordLimit; ?>'}, function(data) {
            $(".result").html(data);
        });
    });
});
</script>

In request.php

<?php
$numberOfUser= $_POST['numberOfUser'];
$recordLimit = $_POST['limit'];

$userOrder = $_POST['order'];


if($userOrder>0) {
//your records
$records = array();
for($i=1;$i<=($recordLimit+($numberOfUser-1));$i++) {
    array_push($records,'R-'.$i);
}

//List Limited Records
$result = "<ul>";

for ($j=($userOrder-1);$j<($recordLimit+($userOrder-1));$j++) {
    $result .= "<li>".$records["$j"]."</li>"; 
}

$result .= "</ul>";
}

else {
    $result = "<h3>Please Select A User</h3>";    
}


echo $result;


?>
Bachu 45 Newbie Poster

Try this

Click Here

Bachu 45 Newbie Poster

Plz change if(isset($_POST['submit'])) to if(isset($_POST['s'])). Bcoz your button name is "s"

And also check your insert query syntax,

Bachu 45 Newbie Poster

Check this

Click Here

Bachu 45 Newbie Poster

Check this
Click Here

Bachu 45 Newbie Poster

Check this

Click Here

Bachu 45 Newbie Poster

Try this. Plz change the order of JS files, to ...

    <script src="assets/js/jquery-1.11.1.min.js"></script>
   <script src="assets/js/jquery.dataTables.min.js"></script>   
Bachu 45 Newbie Poster

Try this condition

if(isset($_POST['Blocked'])) {
$checked = 'checked="checked"';
}
Bachu 45 Newbie Poster
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$  profile.php?username=$1 [L]

</IfModule>
Bachu 45 Newbie Poster

Check the following example

Your listing page

<script src="//code.jquery.com/jquery-1.10.2.js"></script>

<img class="img_btn" alt="Image 1" rel="1" src="img1.jpg" /><br />
<img class="img_btn" alt="Image 2" rel="2" src="img2.jpg" /><br />
<img class="img_btn" alt="Image 3" rel="3" src="img3.jpg" />
<div class="result">

</div>

<script type="text/javascript">
$(function() {
    $(".img_btn").click(function() {
        $.post('request.php',{id: $(this).attr('rel')}, function(data) {
            if(data) $(".result").html(data);
            else $(".result").html("");

        });
    });
});
</script>

In request.php

<?php
$image_Id = $_POST['id'];

//here you fetch the the result related with image id from mysql and print the result

echo '<h1>You Selected '.$image_Id.'</h1>';
?>
Bachu 45 Newbie Poster

Try This Click Here

Bachu 45 Newbie Poster

Another way is using AJAX.Click Here

Bachu 45 Newbie Poster

Check this Click Here

Bachu 45 Newbie Poster

@burt.munn

We can print the result with in a php tag, like

<?php
if(isset($_POST['sbt'])) {
    echo "<h2>Bill Report</h2>";
    if(is_numeric($_POST['txtCustomersNo']) && is_numeric($_POST['txtAmount'])) {
    if($_POST['txtCustomersNo']>=6) $gratuity = $_POST['txtAmount']*0.18;
    else $gratuity = $_POST['txtAmount']*0.15;

    $tax = $_POST['txtAmount']*0.0875;

    echo "<table cellpadding='2' border='1'>
    <tr><td>No: of Custermers</td><td>".$_POST['txtCustomersNo']."</td></tr>
    <tr><td>Amount:</td><td>".$_POST['txtAmount']."</td></tr>
    <tr><td>Gratuity:</td><td>".$gratuity."</td></tr>
    <tr><td>Tax:</td><td>".$tax."</td></tr>
    <tr><td><strong>Total:</strong></td><td>".($_POST['txtAmount']+$gratuity+$tax)."</td></tr>
    </table>";
    }
    else    echo "<h2>Wrong Customer Number/Amount </h2>";

}
?>

&&

Line 10 -> Checking form is submit or not

Line 12-> Checking customer number and bill amount are numeric

Bachu 45 Newbie Poster

Try this Click Here

Bachu 45 Newbie Poster

Try this

<form name="calcBill" id="calcBill" action="" method="post">
<label for="txtCustomersNo">Customers Number</label>
<input type="text" name="txtCustomersNo" id="txtCustomersNo" value="<?php  echo isset($_POST['txtCustomersNo']) ? $_POST['txtCustomersNo'] : "1"; ?>" />
<label for="txtAmount">Amount</label>
<input type="text" name="txtAmount" id="txtAmount"  value="<?php  echo isset($_POST['txtAmount']) ? $_POST['txtAmount'] : "0"; ?>" />
<input type="submit" name="sbt" value="Calculate" />
</form>

<?php
if(isset($_POST['sbt'])) {
echo "<h2>Bill Report</h2>";
if(is_numeric($_POST['txtCustomersNo']) && is_numeric($_POST['txtAmount'])) {
if($_POST['txtCustomersNo']>=6) $gratuity = $_POST['txtAmount']*0.18;
else $gratuity = $_POST['txtAmount']*0.15;

$tax = $_POST['txtAmount']*0.0875;
?>
<table cellpadding="2" border="1">
<tr>
<td>No: of Custermers</td>
<td><?php echo $_POST['txtCustomersNo']; ?></td>
</tr>
<tr>
<td>Amount:</td>
<td><?php echo $_POST['txtAmount']; ?></td>
</tr>
<tr>
<td>Gratuity:</td>
<td><?php echo $gratuity; ?></td>
</tr>
<tr>
<td>Tax:</td>
<td><?php echo $tax; ?></td>
</tr>
<tr>
<td><strong>Total:</strong></td>
<td><?php echo $_POST['txtAmount']+$gratuity+$tax; ?></td>
</tr>
</table>
<?php
}
else {
?>  
    <h2>Wrong Number Of Customers Or Amount </h2>
<?php
}

}
?>
Bachu 45 Newbie Poster

Check this Click Here

Bachu 45 Newbie Poster

Please check the below example...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Questions</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
</head>

<body>

<?php
$numberOfQstns = 5;
$numberOfOptions = 4;
if(isset($_POST['sbtBtn'])){
    echo '<h2>Selected Answers</h2>';
    for($i=1;$i<=$numberOfQstns;$i++) {
        echo '<p>Answer('.$i.'): Question-'.$i.'-Option-'.$_POST["option{$i}"].'</p>';
    }
    echo '<a href=""><< Back >></a>';
}
?>

<form name="myform" id="myform" action="#" method="post" style="width: 160px;display:<?php echo (isset($_POST['sbtBtn'])) ? 'none' : 'block' ?>;">
<?php
for($i=1;$i<=$numberOfQstns;$i++) {
    echo <<<EOD
        <h2>$i; Question-$i</h2>
EOD;
    for($j=1;$j<=$numberOfOptions;$j++) {
        echo <<<EOD
        <input type="radio" name="option{$i}" value="$j"><label>Question-$i-Option-$j</label><br />
EOD;
}
    echo '<hr />';
}

?>
<br />
<input type="submit" value="Submit" name="sbtBtn" id="myBtn" />

</form>
<script type="text/javascript">

    $(document).ready(function() {

    $("#myBtn").click(function(e) {
        var errorMessage="";
        var myCount= 0;
<?php
    for($i=1;$i<=$numberOfQstns;$i++) {
?>      
        if($('input[name=option<?php  echo $i;  ?>]:checked').length<=0)
        {
            if(myCount>0) errorMessage+="\n";
         errorMessage+=(myCount+1)+"; Please Answer Question No:<?php echo $i;  ?>";
         myCount++;
        }
<?php
}       
?>      
    if(errorMessage!="") {
     alert (errorMessage);
     e.preventDefault();
     return false;
     }

    });


    });

</script>

</body>
</html>
Bachu 45 Newbie Poster

Try this Click Here

Bachu 45 Newbie Poster

Please check Click Here

Bachu 45 Newbie Poster

Change this

foreach($data as $eachResult)
    {

        $this->Cell($w[0],6,'SL.NO',1,'LR');      
        $this->Cell($w[1],6,$eachResult["ac_no"],1,'LR');
        $this->Cell($w[2],6,$eachResult["cust_name"],1,'LR');       
        $this->Cell($w[3],6,$eachResult["installamt"],1,'LR');      
        $this->Ln();

    } 

To

foreach($data as $key=>$eachResult)
    {
        $key++;
        $this->Cell($w[0],6,$key,1,'LR');      
        $this->Cell($w[1],6,$eachResult["ac_no"],1,'LR');
        $this->Cell($w[2],6,$eachResult["cust_name"],1,'LR');       
        $this->Cell($w[3],6,$eachResult["installamt"],1,'LR');      
        $this->Ln();

    }
Bachu 45 Newbie Poster

Since $_POST['Item1'] and $_POST['Item2'] are array, you have to convert it to string before saving to your table.

Replace
$TextBox_item1 = ($_POST['Item1']);
with this to
$TextBox_item1 = implode(',', $_POST['Item1']);

And

$TextBox_item2 = ($_POST['Item2']);
with this to
$TextBox_item2 = implode(',', $_POST['Item2']);

Bachu 45 Newbie Poster

Try this ..Click Here

And change the click event to mouseover

Bachu 45 Newbie Poster

Hai;

Try this,Click Here

Bachu 45 Newbie Poster

Try this

$tableArray = array(1,2,3,4,5);
$idArray = array(1,6,5);

foreach ($idArray as $myId) {
    $checked = (in_array($myId,$tableArray)) ? 'checked' : '';
    echo '<label>'.$myId.'</label><input type="checkbox" '.$checked.' value=""><br />';
}
Bachu 45 Newbie Poster

Try this

$array_one = array('Champlain Valley TTC(1/31/2015)','Old Shelburne Town School5420 Shelburne RdSherburne, VT  05482','Friday - 6:30 - 10:00PM','Jack Devine802-877-3341','<-----NEXT_CLUB ----->','Green Mountain Table Tennis Club(GMTTC)(6/30/2014)','Knights of Columbus - Boys & Girls Club Gymnasium21 Merchants RowRutland, VT  05701','Wednesday - 6:00 - 10:00PM and 2 Fridays(6:00 - 10:00PM) & 2 Saturdays(7:00AM - 9:00PM) per year for  tournaments(last Fri/Sat in March & Fri/Sat in Nov or Dec)','Ronald Lewis802-247-5913','<-----NEXT_CLUB ----->','Upper Valley Table Tennis Club(9/30/2014)','Marion Cross Elementary School Gym22 Church StNorwich, VT  05051','Wednesday - 7:00 - 9:15PM(During School Year)','Douglas Haynes603-643-2178','<-----NEXT_CLUB ----->');

echo '<h2>First Array</h2>';
var_dump($array_one);
$array_two = array();
$arrayIndex=0;
$loopCount=0;
$second_index="";
foreach ($array_one as $myValue) {
    $loopCount = ($loopCount<5) ? $loopCount : 0;
    switch ($loopCount) {
        case '0':
            $second_index="cName";
        break;
        case '1':
            $second_index="local";
        break;
        case '2':
            $second_index="days_times";
        break;
        case '3':
            $second_index="contact";
        break;
        case '4':
            $second_index="marker";
        break;
    }

    $array_two[$arrayIndex][$second_index]=$myValue;
    $arrayIndex = ($loopCount>=4) ? $arrayIndex+1 : $arrayIndex;
    $loopCount++;
}

echo '<h2>Second Array</h2>';

var_dump($array_two);
Bachu 45 Newbie Poster

Did you dry just print the value directly like
<img id="imgs" src="../images/verificarimg/img.jpeg" width=700> ?

Then, If you don't get the image, please check the path of image/name of image/type of image(jpeg,jpg,png etc)

Bachu 45 Newbie Poster

Try this

<?php
include 'connectMySql.php';

session_start();
if(isset($_POST['login']))
{
    $username = mysql_real_escape_string($_POST['username']);
    $password = mysql_real_escape_string($_POST['password']);
    if($username && $password)
    {
        $query = "SELECT * FROM users  WHERE username = '$username' AND password = '$password'";
        $result=mysql_query($query);
        $count=mysql_num_rows($result);

        if($count>0)
        {
            $_SESSION['username'] = $username;
            $_SESSION['password'] = $password;
            header("location:members.php");
        }
        else
        {
            header("location:index.php?notify=Incorrect Username or Password.");
        }
    }
    else
    {
        header("location:index.php?notify=All fields are required.");
    }
}

?>
Bachu 45 Newbie Poster

Can you show me your code ?

For reference Click Here