im using http://cpp.sh/ as my ide.
but clrscr() and gotoxy() is not working since conio is not recognize...is there any header file that supports this codes? please help..thanks

#include <iostream>
#include<conio>
using namespace std;
int main()
{
   clrscr();
    gotoxy(5,10);cout<<"HELLO WORLD";
}

Please help....i want to save a user to my database..using wampserver...

<form method="POST" action="">
    <center><br>
<H1>USER REGISTRATION</H1>
        <table>   
    <tr>
        <td>User Id</td>
        <td><input type="text" name="userId"></td>
    </tr>
        <tr>
        <td>Lastname</td>
        <td><input type="text" name="lastname"></td>
    </tr>
         <tr>
        <td>Firstname</td>
        <td><input type="text" name="firstname"></td>
    </tr>
        <tr>
        <td>Middle Name</td>
        <td><input type="text" name="middleName"></td>
    </tr>
         <tr>
        <td>Suffix</td>
        <td><input type="text" name="suffix"></td>
    </tr>
        <tr>
        <td>Position</td>
        <td><input type="text" name="position"></td>
    </tr>
        <tr>
        <td>Privilege</td>
        <td><select name="priv">
                        <option>Administrator</option>
                        <option>User</option>
                    </select>
                </td>
        </tr>
        <tr>
        <td>Username</td>
        <td><input type="username" name="username" ></td>
         </tr>
        <tr>
        <td>Password</td>
        <td><input type="password" name="password" ></td>
        </tr>
         <tr>
                <td></td>
                <td><input type="submit" name="save" value="Save"></td>
        </tr>
</table>
</form>

<?php
 include '../config/connect.php';
if (isset($_POST['save']))
                {
                    $userId=  strtoupper($_POST['userId']);
                    $lastname=  strtoupper($_POST['lastname']);
                    $firstname=strtoupper($_POST['firstname']);
                    $middleName=  strtoupper($_POST['middleName']);
                    $suffix=  strtoupper($_POST['suffix']);
                    $position=  strtoupper($_POST['position']);
                    $privilege=strtoupper($_POST['priv']);
                    $userName=$_POST['username'];
                    $password=$_POST['password'];

                     $query = "INSERT INTO users
                    VALUES (Null,'$userId',
                        '$lastname',
                        '$firstname',
                        '$middleName',  
                        '$suffix',
                        '$position',
                        '$privilege',
                        '$userName',  
                        '$password')";
            $result = mysqli_query($query);
            if ($result)
            {
                echo "<center>Successfully Saved!</center>";
            }
            else
            {
                echo "<center>User Account Saving Failed!</center>";
            }
        }    
 ?>

Why is my menu not working in internet explorer but working in chrome and firefox..

here is my code:

html:

<html>
    <head>
        <title>practice</title>
        <link rel="stylesheet" type="text/css" href="style.css" >
    </head>
    <body>
        <div id="container">
            <div>
                <nav>
                    <ul>
                        <li><a href="#">HOME</a></li>
                        <li><a href="#">CATEGORIES</a>
                            <ul>
                                <li><a href="#">Samsung</a></li>
                                <li><a href="#">IPhone</a></li>
                                <li><a href="#">Cherry Mobile</a></li>
                                <li><a href="#">Myphone</a></li>
                                <li><a href="#">Nokia</a></li>
                                <li><a href="#">Huawei</a></li>
                            </ul>
                        </li>
                        <li><a href="#">SCHEDULE</a></li>
                        <li><a href="#">ABOUT US</a></li>
                        <li><a href="#">FEEDBACK</a></li>
                    </ul>
                </nav>
            </div>

        </div>
    </body>
</html>

css:

#container {
    margin: auto;
    padding: auto;
    width: 1000px;
    background: #ffffff;
}
nav ul {
    list-style-type: none;
    overflow: hidden;
    margin: 0px;
    padding: 0px;
    background: #004eff;
}
nav ul li {
    display: inline-block;
}
nav ul li a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    padding: 14px 14px;
    font-family: "Segoe UI Symbol";
    transition: all 0.4s ease-in-out;
    font-weight: bold;
}
li a:hover {
    background-color: #00b4ff;
    opacity: 0.8;
}
ul li ul {
    display: none;
}
ul li:hover ul {
    display: block;
}
ul ul {
    display: none;
    position: absolute;
}
ul ul li {
    display: block;
    position: relative;
}

Need a free links of for c++ compiler ide for windows multipoint server 2012 OS..thank you.. I download turbo c++ but its dos based and my setup is n.computing..it will not run to other monitor connected to the main pc.. thank you..

i tried to revised based on the code above.with 2 separate files.no blank lines before <?php or after ?>.but i think what will come in the xcel file is the html code of the new blank window that after clicking export button. thanks..

I have this code below for export mysql database to excel..however, if i run this it will only export the html code of the page not the sql query..please help..thank you.

<html>
     <head><title>Exports</title>           
     <link rel="stylesheet" href="css/css.css" />
      <h2>EXPORT DATE/YEAR</h2></head>
<form action="" method="post">
    <table>
        <tr>
            <td><input size="40"  name="searchString" type="text"class="ed"  />
                <select name="by" class="ed">
                        <option>Date</option>
                        <option>Year</option>
                </select>
                <input type="submit" name="export" value="Export" id="button2" /></td>
        </tr>
    </table>
</form>

 <?php
  if(isset($_POST['export']))
    {
         //sanitize the input
                function clean($str)
                {
                        $str = @trim($str);
                        if(get_magic_quotes_gpc())
                                {
                                $str = stripslashes($str);
                                }
                        return mysql_real_escape_string($str);
                }
        $searchString = strtoupper(clean($_POST['searchString']));
        $by=clean($_POST['by']);

        if ($by=='Date')
        {
        $host="localhost";
        $uname="root";
        $pass="Unknown";
        $database = "dcde"; 

        $connection=mysql_connect($host,$uname,$pass); 
        echo mysql_error();
        //or die("Database Connection Failed");
        $selectdb=mysql_select_db($database) or 
        die("Database could not be selected"); 
        $result=mysql_select_db($database)
        or die("database cannot be selected <br>");

        // Fetch Record from Database
        $output = "";
        $table = "po"; // Enter Your Table Name 
        $sql = "Select poNo,date,supplier,tAmount,code from $table WHERE  date like '%$searchString%'";
        $columns_total = mysql_num_fields($sql);
        // Get The Field Name
        for ($i = 0; $i < $columns_total; $i++) {
        $heading = mysql_field_name($sql, $i);
        $output .= '"'.$heading.'",';
        }
        $output .="\n";
        // Get Records from the table
        while ($row = mysql_fetch_array($sql)) {
        for ($i = 0; $i < $columns_total; $i++) {
        $output .='"'.$row["$i"].'",';
        }
        $output .="\n";
        }
        // Download the file
        $filename = "myfile.csv";
        header('Content-type: application/csv');
        header('Content-Disposition: attachment; filename='.$filename);
        echo $output;
        exit;           
    }
    }
 ?>

i got this code from the internet to export mysql query to excel using php..i just modify it to meet my need. i need some help on this..thanks..

<?php
$DB_Server = "localhost"; 
$DB_Username = "root";    
$DB_Password = "";              
$DB_DBName = "dcde";        
$DB_TBLName = "po"; 
$filename = "filename";        

$sql = "Select poNo,date,supplier,tAmount,code from $DB_TBLName WHERE  code='2'";
$Connect = @mysql_connect($DB_Server, $DB_Username, $DB_Password) or die("Couldn't connect to MySQL:<br>" . mysql_error() . "<br>" . mysql_errno());

$Db = @mysql_select_db($DB_DBName, $Connect) or die("Couldn't select database:<br>" . mysql_error(). "<br>" . mysql_errno());   

$result = @mysql_query($sql,$Connect) or die("Couldn't execute query:<br>" . mysql_error(). "<br>" . mysql_errno());    
$file_ending = "xls";

header("Content-Type: application/xls");    
header("Content-Disposition: attachment; filename=$filename.xls");  
header("Pragma: no-cache"); 
header("Expires: 0");

$sep = "\t"; 

for ($i = 0; $i < mysql_num_fields($result); $i++) {
echo mysql_field_name($result,$i) . "\t";
}
print("\n");    

    while($row = mysql_fetch_row($result))
    {
        $schema_insert = "";
        for($j=0; $j<mysql_num_fields($result);$j++)
        {
            if(!isset($row[$j]))
                $schema_insert .= "NULL".$sep;
            elseif ($row[$j] != "")
                $schema_insert .= "$row[$j]".$sep;
            else
                $schema_insert .= "".$sep;
        }
        $schema_insert = str_replace($sep."$", "", $schema_insert);
        $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert);
        $schema_insert .= "\t";
        print(trim($schema_insert));
        print "\n";
    }   
?>

attached are the two images..1st is the the output of this code..and the 2nd file is my desired output which is already formatted.. like 1) the name of the field is change, bold..2) column should be automatically adjusted to fit the entry 3)..additional entry like PREPARED: NAME

thanks a lot..

problem solved.thanks

thank you.problem solved :)

im almost done only this one..
how to put / if the date is like this

$myDate = "06202014";

to make it look like this

06/20/2014

for $myDate1 its working ..thanks..how about $myDate2

In addition, may i ask how is this possible

if ($myDate contains '-' or '/')
{
statement;
.
.
}

thanks

i think it returns the default starting date below

01/01/197001/01/1970

however if I do it in reverse its working

$myDate = "06/20/2014";
$newDate = date("m-d-Y", strtotime($myDate));
echo $newDate;

result is

06-20-2014

i need to change the - of the date into / in $myDate1 . here is my code but its not working. also i need to insert / in the $myDate2 variable.

$myDate1 = "06-20-2014";
$myDate2 = "06202014";
$newDate1 = date("m/d/Y", strtotime($myDate1));
$newDate2 = date("m/d/Y", strtotime($myDate2));
echo $newDate1;
echo $newDate2;

thanks

Thank you..

please help ..the date format in my datase is Y-m-d.. now i want to search by date..so in my textbox i need only to type
example:
data in the database: 2014-06-19

in the textbox search i will only type EITHER of the following : 06-19-2014 OR 06192014 (without the - and format is change)

here is the part of my code:

            $searchString=clean(strtoupper($_POST['searchString']));  
            $searchString =date("Y-m-d", strtotime($searchString));

            $query = "SELECT *
                        FROM po
                        WHERE (date = '$searchString') || (date LIKE '%$searchString%')";
            $result = mysql_query($query);
             echo "<table border=1 style='border-collapse: collapse' width=95%>";
             echo "<tr class='tableheader'> 
                    <td>DATE</td> 
                    <td>P.O.#</td>                 
                     <td>SUPPLIER</td>
                     <td>AMOUNT</td>
                     <td>CODE</td>
                     <td></td>
                     <td></td>
                   </tr>";
             while ($records =  mysql_fetch_array($result)){
                    $poDateRetrieved = $records['date'];
                    $poDate=date("m-d-Y", strtotime($poDateRetrieved));

                   echo "<tr> 
                     <td>{$records['poNo']}</td>                 
                     <td>$poDate</td>
                     <td>{$records['supplier']}</td>
                     <td>{$records['tAmount']}</td>
                     <td>{$records['code']}</td>
                     <td><a href=purchaseOrder.php?page=23?&poNo={$records['poNo']}>[UPDATE]</td>
                     <td><a href=purchaseOrder.php?page=24?&poNo={$records['poNo']}>[DELETE]</td>
                   </tr>";
                }
                echo "</table>";

I have a date in a textbox ..
$myDate ='06/30/2014'

how do i convert it into this format..since this is the date format in the database..
$myDate ='2014-06-30'

thanks..

i tried pasting this in wampserver sql.. i gotthis error...#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTEGER) ASC LIMIT 0, 30' at line 1

i got the following entry in my dtabase..
field: poNo
001
002
003
004
005
006
007
008
009
0010
0011
0012
0013

if i issue in my php program this sql statement:

$query = "SELECT * FROM po ORDER BY poNo ASC";

the result is:
001
0010
0011
0012
0013
002
003
004
005
006
007
008
009

which is not my desired output.. i need it to be on sequence like this.
001
002
003
004
005
006
007
008
009
0010
0011
0012
0013

please help..

by the way, my php code is the following:

$query = "SELECT *
                        FROM po ORDER BY poNo ASC";
            $result = mysql_query($query);
             echo "<table border=1 style='border-collapse: collapse' width=95%>";
             echo "<tr class='tableheader'> 
                    <td>DATE</td> 
                    <td>P.O.#</td>                 
                     <td>SUPPLIER</td>
                     <td>AMOUNT</td>
                     <td>CODE</td>
                     <td></td>
                     <td></td>
                   </tr>";
                while ($records =  mysql_fetch_array($result)){
                   echo "<tr> 
                    <td>{$records['date']}</td> 
                    <td>{$records['poNo']}</td>                 
                     <td>{$records['supplier']}</td>
                     <td>{$records['tAmount']}</td>
                     <td>{$records['code']}</td>
                     <td><a href=purchaseOrder.php?page=23?&poNo={$records['poNo']}>[UPDATE]</td>
                     <td><a href=purchaseOrder.php?page=24?&poNo={$records['poNo']}>[DELETE]</td>
                   </tr>";
                }
                echo "</table>";

this is what im looking for..thank you for the reference..

ahw..ill study ajax..thank you.

i just want to make a search box..when i type anything on the input box, then a dropdown displays data from the database... like a google search box..when you type there is a dropdown related to the search string..

ill try to modify my codes..abovee..thnx

pls help me improve this code.. on change, it search the database and the query will be drop down..

<input size="35"  name="supplier" type="text" class="ed"
 value="
 <?php
echo "<select>";
$query = "SELECT * from supplier ORDER BY company ASC";
$result = mysql_query($query);
while ($record = mysql_fetch_array($result)){
 echo "<option>{$record['company']}<option>";
}
echo "</select>"; ?>

i have an html textbox use for searching and when I type on the textbox the field in database will appear as dropdown...pls..help.thanks

Thanks Ill try this one.

help on textbox to accept numbers only ...thanks

thanks..ill just use javascript

like students id has barcode and when capturing, the code will appear in the inputbox.

how to capture data from a barcode using php?

ok thanks..