• Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Count Total Data Base On Dropdown menu Using Jquery / Javascript

    Select count of male: SELECT COUNT(*) FROM mydatatable WHERE gender = 'male' and select count of female: SELECT COUNT(*) FROM mydatatable WHERE gender = 'female'
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to gabrielcastillo in form

    You need to change the action value of you form. `action="<?php $_SERVER['PHP_SELF']; ?>/registration2.php"`
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to gabrielcastillo in form

    You need to change the action value of you form. `action="<?php $_SERVER['PHP_SELF']; ?>/registration2.php"`
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to gabrielcastillo in form

    You need to change the action value of you form. `action="<?php $_SERVER['PHP_SELF']; ?>/registration2.php"`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to close an open Windows dialog box that won't close in ordinary way?

    Alt-F4 does the trick for me in Vista.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to close an open Windows dialog box that won't close in ordinary way?

    Alt+F4 works in all Windows OS and other OS like Linux (maybe all OS).
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in display a Random unique ID in a textbox and insert it into database

    I don't understand why you want to encrypt a unique ID
  • Member Avatar for AndrisP
    AndrisP

    Began Watching problem with inserting data in the DB

    Hi I have a problem with inserting into the database. This is my code : $insert = $db_con->query("INSERT INTO users (username,password,email,com-name,com-logo,com-phone,com-mobile) VALUES('".$username."','".$enc_pass."','".$email."','".$com_name."','".$profile_path."','".$com_phone."','".$com_mobile."')");
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in problem with inserting data in the DB

    Is the username '1'?
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to display the data by using dropdown list

    Something like this: <label for="ch_p">use BLYEAR</label> <input id="ch_p" type="checkbox" onchange="this.nextSibling.disabled=(this.checked?false:true)" <?php if(isset($_GET['p'])){ echo " checked"; } ?> /><select name="p" <?php if(!isset($_GET['p'])){ echo " disabled"; } ?> > <option value=".....">.....</option><!-- All …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to display the data by using dropdown list

    I think 3 tables SELECT (SELECT value FROM fruits WHERE value='Apple' LIMIT 1) as fruit , (SELECT value FROM countries WHERE value='China' LIMIT 1) as countrie , (SELECT value FROM …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to display the data by using dropdown list

    Hi there, May I know if i want to filter 3 column, for example Column A, Column B and Column C When user select Column A, the mysql query will …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to display the data by using dropdown list

    I think you need 3 tables instead of 3 columns e.g. Fruits, Countries, Sizes
  • Member Avatar for AndrisP
    AndrisP

    Began Watching form

    Hello, I am trying to create a form like this: registration1.php <form name="registration1" action="registration2.php<?php //$_SERVER['PHP_SELF'] ?>" method="POST"> <tr> <td>First Name</td> <td><input style="width: 500px;" type="text" name="fname" size="80px"><br><br></td> </tr> <tr> <td>Last Name</td> …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in form

    Attribute name="submit" always for submit button. And check your HTML syntax - where starts <table> ?
  • Member Avatar for AndrisP
    AndrisP

    Began Watching display a Random unique ID in a textbox and insert it into database

    I am developing a project on PHP and MySQL. My problem is "I am unable to show a uniqueID in a textbox like 'GHY00001, GHY00002, etc' auto-incremented everytime i load …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in display a Random unique ID in a textbox and insert it into database

    Show your script please
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Is this possible?

    Hi, I'm a web development newbie. I was wondering if this was possible: Say there's a page where you submit a value in a form, and when you click submit …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Is this possible?

    session_start(); if ( isset($_POST['name']) ){ $_SESSION['first_name'] = $_POST['name']; } $first name = ( isset($_SESSION['first_name']) ? $_SESSION['first_name'] : ""); echo $first name;
  • Member Avatar for AndrisP
    AndrisP

    Began Watching clause not producing results

    Ok so this has me a little stumped. I have a WHERE clause that produces results in phpmyadmin but not on the web page. Here is what I have $sqlCur …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in clause not producing results

    Third example - wrong SQL query: `&&` replace to `AND`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching XML to XSLT

    I have this database in stored inside my Visual Studio Express 2013 for web. How can I use XSLT to turn into: <?xml version="1.0" encoding="utf-8" ?> <graph caption='Cashflow' subcaption='(Drag to …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in XML to XSLT

    http://www.roguewave.com/Portals/0/products/imsl-numerical-libraries/java-library/docs/5.0.1/chartpg/xml_xslt.html
  • Member Avatar for AndrisP
    AndrisP

    Began Watching PLEASE HELP SPOJ PROBLEM PRIME NUMBERS

    #include<iostream> #include<cstdio> using namespace std; int main() { int test; scanf("%d",&test); while(test--) { int n,m; cin>>m>>n; bool arr[n+1]; for(int i=0;i<n;i++) arr[i]=true; int p=2; for(int i=2;(p*i)<=n;i++) { while((p*i)<=n) { if((p*i)>n) break; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in PLEASE HELP SPOJ PROBLEM PRIME NUMBERS

    It working perfectly for me with *DEV C++ 5.6.3 General: TDM-GCC 4.8.1 64-bit Release Executing g++.exe...*
  • Member Avatar for AndrisP
    AndrisP

    Began Watching preg_replace to force specific phone number format

    OK, I have the following regulare expression for phone number validation, but it doesn't really do EXACTLY what I want... What I want to see is a forced format 000-000-0000 …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in preg_replace to force specific phone number format

    preg_match('~^(\d{3}\-){2}\d{4}$~', '000-000-0000') and don't need check strlen
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Read from mysql db table field in to blank checkboxes

    In sql query \` (ASCII-96) and ' (ASCII-39) not the same sense! Use (ASCII-96) for table names and field names but (ASCII-39) for values (line 24)
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Read from mysql db table field in to blank checkboxes

    Can anybody help or point me in the right direction what is missing on my code. The postcode is a mysql table and one field stores user's choice of postcodes …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Read from mysql db table field in to blank checkboxes

    Your postcode datatype is string but you check integer $i in array of string in line 36. You put array as label of checkbox in lines 38 and 42 label. …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching help

    So i made a inbox system and its stores the accents(í,é,ú etc..) like &iacute;,&eacute;,&uacute; wich is perfect, but then i made another script and its storing the í's like à …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in help

    When connected to the database immediatly set charset e.g. $link = mysql_connect('localhost', 'root', ''); $db_selected = mysql_select_db("dbname", $link); mysql_set_charset('utf8',$link); or OOP version $mysqli = new mysqli('localhost', 'root', '', 'dbname', 3306); …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching i want loop to display numbers only from 01 to 12

    i want to display numbers only from 01 to 12 How to write a loop <?php for($a=0; $a<10; $a++) { for($b=0; $b<10; $b++) { echo $a.$b.", "; } } ?>
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in i want loop to display numbers only from 01 to 12

    for($i=1; $i<=12; $i++){ echo str_pad($i, 2, "0", STR_PAD_LEFT)."<br/>"; }
  • Member Avatar for AndrisP
    AndrisP

    Began Watching exporting multiple tables into a single csv file

    //exporting to csv file. // this is my code. <?php // Database Connection $host="localhost"; $uname="root"; $pass=""; $database = "db_name"; $connection=mysql_connect($host,$uname,$pass); echo mysql_error(); //or die("Database Connection Failed"); $selectdb=mysql_select_db($database) or die("Database could …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in exporting multiple tables into a single csv file

    JOIN tables, if the second table supplements the entries from the first table or UNION tables if the tables have the same structure
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in if its string display error

    Perhaps more convenient to use the selector instead of a text field <select name="bodovi"> <script type="text/javascript"> for(var i=1; i<=50; i++){ document.write('<option value="'+i+'">'+i+'</option>'); } </script> </select>
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in if its string display error

    Use `elseif` instead `if` in lines 5 and 6 of my code
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in if its string display error

    $errors = array(); // and then test for all errors if(!ctype_digit($var)){ $errors[] = "NOT DIGIT!"; } if($var==0){ $errors[] = "IS SET NULL!"; } if($var==""){ $errors[] = "IS SET EMPTY VALUE!"; …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Multiple Events for one ID

    I want one script to have multiple events (jQuery), based on what event is triggered it will load up different content on the same div. Does that make sense or …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Multiple Events for one ID

    Maybe something like this: $('#anchor, #anchor2, #anchor3') .click(function(){ ... }) .dblclick(function(){ ... }) .hover(function(){ ... });
  • Member Avatar for AndrisP
    AndrisP

    Began Watching if its string display error

    I need command that will display error if var is not number I tried few examples but nothing seems to work, here is what I tried, one worked but it …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in if its string display error

    if(!ctype_digit($var)){ echo "NOT DIGIT"; }
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in result is not displaying

    Cut and paste line 6 after the line 23
  • Member Avatar for AndrisP
    AndrisP

    Began Watching result is not displaying

    Why when submit is pressed, and number of tickets is 3 or higher I am not geting displayed echo? echo "You choose $place and $tickets tickets, and you get discount …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in result is not displaying

    Line 25 replace `elseif` to `if`, lines 13, 16, 19, 22 need quotes like this: `if ($place == 'balkon')`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching <?php start tag given me error in Codeigniter

    Hello EveryOne I confuse of bellow code <?php if($True == 0){ ?> <a href="/#"> Apply </a> <?php}else{?> <a href="/#"> Aleary applied </a> <?php }?> **Given Me Error** `Parse error: syntax …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in <?php start tag given me error in Codeigniter

    I recommend to insert spaces: <?php if($True == 0){ ?> <a href="/#"> Apply </a> <?php } else { ?> <a href="/#"> Aleary applied </a> <?php } ?>
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in insert into table from another table mysql

    Ok as You Like
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in insert into table from another table mysql

    Me it works perfectly. Maybe try another delimiter e.g. `||`

The End.