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>