• Member Avatar for AndrisP
    AndrisP

    Replied To a Post in what is wrong in this javascript

    Why you do not use a `switch`? It would be more convenient here: function kal(ta){ var xy=ta,x1,x2,x3,x4; switch(xy){ case 1: x1=0; x2=1; x3=1; x4=1; break; case 2: x1=1; x2=0; x3=1; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in what is wrong in this javascript

    Look to the console: "as" is not defined (line 29 and 95), function in parameter "ta" not used inside function.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching what is wrong in this javascript

    function "kal" and "getsign" not functioning. function kal (ta) { var xy; var x1 ; var x2; var x3; var x4; if (xy==1) {x1=0; x2=1; x3=1; x4=1;} else if (xy==2) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in user profile with php mysql

    But string variable value should be in quotes $q = mysql_query("SELECT `id` FROM `users` WHERE `name`='".$name."'"); this also is not good solution - use prepared statement to prevent from SQL …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in user profile with php mysql

    Table name and column name in MySQL query string should be without quotes or you can use backticks.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching user profile with php mysql

    I want to create a php function that i can use to get a particular user details and display the info gotten in my ProfileActivity when a user profile is …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in how to insert data into another table from dynamic dropdown list

    ... or you want to crete new table "saveoffices" and migrate all data from "office1" and "office2"? Show your table structures and relations.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in how to insert data into another table from dynamic dropdown list

    Use prepared statement instead of direct insert to prevent from SQL injection! You try to save into table `saveoffice`? To save into tables `office1` and `office2` try something like this: …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching how to insert data into another table from dynamic dropdown list

    i have 2 tables office1 > id,off1 office2 > id,off2_id,off2 i want to insert the choosen into table "saveoffice" > offices1,offices2 drop.php <!DOCTYPE html> <html dir="rtl" lang="ar"> <head> <meta charset="utf-8"> …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Convert The numerical string to regular expression? How?

    It is not right answer - redundant white space after hiphens right is: `(\d{3}[-]){2}\d{5}` (three digits with followed hiphens) {two times} and then five digits
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Convert The numerical string to regular expression? How?

    Hi Is there any simple way or online website that can convert The numerical string like"123-322-14365" to regular expression?
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in jQuery Datepicker: Set Current Date

    Other way: $(document).ready(function() { let today = new Date().toISOString().substr(0, 10); $("#datePicker").val(today); });
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in jQuery Datepicker: Set Current Date

    I see you are using `<input type="date" />` - do not need set date by jQuery, just add value (format `YYYY-MM-DD`), e.g. `<input type="date" value="2018-09-24" />`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching jQuery Datepicker: Set Current Date

    On my page https://fiftyallstars.com/50/curriculum.html , I have some basketball drills loading from a google spreadsheet of mine. Only thing is after it loads, I can't seem to get the datepicker …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Add two external monitors

    Read tech spec abot your graphic card - max count of monitors, sum of max pixel-width and sum of max pixel-height
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Add two external monitors

    i am trying to add two external monitors to extend screen on my toshiba laptop through vga and hdmi port . But only one is working. i cannot detect second …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Fusion Chart taking data from xml

    Your mistake is here `caption='Harry' s SuperMart '`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Fusion Chart taking data from xml

    Hello, I have been experimenting with Fusion Chart. I have been following this tutorial: https://www.fusioncharts.com/dev/chart-guide/getting-started/using-xml-as-data-format and trying to take the chart data from xml yet it does not works. bar_chart_xml.html …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in simple PHP OOP

    you can call destructor by set object to `NULL` e.g. $stefan = new person(); $jimmy = new person(); $stefan->set_name('stefan'); $jimmy->set_name('jimmy'); echo "Stefan Full Name : ".$stefan->get_name(); echo "Jimmy Full Name …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in simple PHP OOP

    Also edit functions: function set_name($new_name){ $this->name = $new_name; } and function get_name(){ return $this->name; }
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in simple PHP OOP

    ... or call constructor with param: $stefan = new person('Stefan');
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in simple PHP OOP

    Edit `__constructor` to `__construct` and `__destructor` to `__destruct`. If you define function with required argument then you cant initialize it without argument e.g. Constructor with required argument: function __construct($person_name){ echo …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching simple PHP OOP

    Hello, I try to create a simple OOP PHP that shows an error: class_lib.php <?php class person { var $name; function __constructor($person_name){ echo "Initialize class"; } function set_name($new_name){ $this->name($new_name); } …
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to pty in What's the significance of Robots.txt file in a website?

    The irony is palpable.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in code works in test file but not live form

    Try to rename JS function to different from select element ID. And a few more tips: if you declare XHTML document then always close tags. The XHTML syntax does not …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching code works in test file but not live form

    hi ive done a piece of code for if select a region the postcodes pop up for that region all works on a seperate file but if i put on …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Trying to upload image type files only.

    In nyour code `if` case in line 32 allways `true` because actually you check if exist array which defined inside self `if` case. Get file extension e.g. $ext = pathinfo($_FILES["images"]["name"], …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Trying to upload image type files only.

    Use `send_long_data`http://php.net/manual/en/mysqli-stmt.send-long-data.php for blob upload in to the DB and use prepared statement to prevent from SQL injection.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Trying to upload image type files only.

    Hello, I am trying to prevent my form, from submitting if the file is not an image type file but i keep failing, the array that i am using keeps …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to create daily earnings table for each user using PHP and MySQL?

    If you wanti to create new table each day then you can create stored MySQL procedure e.g. delimiter $$ create procedure `user_earning`(in p_name varchar(30), in p_earn decimal(6,2), out p_sum decimal(6,2)) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to create daily earnings table for each user using PHP and MySQL?

    php function `time()` also return timestamp but what about it with a table create?
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to create daily earnings table for each user using PHP and MySQL?

    I let users earn money through my site, and I want to record their daily earnings. I want to record their earnings starting from 00:01am I don't know how to …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to use an php array in an sql query ?

    @klaus.veliu - Safe version is $users=array("Vito","Joey","Vinny"); $prep=str_pad("?",count($users)*2-1,",?"); // produce string '?,?,?' $sql = "SELECT * FROM `users` WHERE `name` in (".$prep.")"; $stmt = $db->prepare($sql); $stmt->execute($users); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); or $users=array("Vito","Joey","Vinny"); …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to use an php array in an sql query ?

    Hello to all, I am trying to execute a mysql query for selecting * rows from the table where user name = [one of the usernames stored in an array]. …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in float right add me a margin top !!

    It's a margin of <h2 class="utopic-flowers"> <span>u</span>topic <span>f</span>lowers </h2> try to replace e.g. <b class="utopic-flowers"> <span>u</span>topic <span>f</span>lowers </b> and you will see that the extra margin of input element disappears
  • Member Avatar for AndrisP
    AndrisP

    Began Watching float right add me a margin top !!

    Hi guys, I'm here again with my psd to html / css template. now i have a strange issue is simple to explain but difficult to deal with. i have …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in PHP Warning: count(): Parameter must be an array or an object that impleme

    Show your function `getListed`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching PHP Warning: count(): Parameter must be an array or an object that impleme

    hi im working on a php script and i have come across the following error does anyone have a ideal what can cause this the error is: PHP Warning: count(): …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in double quotes using xslt

    Outside of main template define two variables and another template: <xsl:variable name="quot">"</xsl:variable> <xsl:variable name="doublequot">""</xsl:variable> <xsl:template name="string-replace-all"> <xsl:param name="text" /> <xsl:choose> <xsl:when test="contains($text, $quot)"> <xsl:value-of select="substring-before($text,$quot)" /> <xsl:value-of select="$doublequot" /> <xsl:call-template …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching double quotes using xslt

    How to escape the double quotes using XSLT: My xls file converting xml file into csv file. my xml node is as below: <?xml version="1.0" encoding="ISO-8859-1"?> <TRADING_TITLE><TITLE>SBU</TITLE><DESCRIPTION><![CDATA[Simply Be Inquiries]]></DESCRIPTION><REGISTERED><NAME><![CDATA[Speciality Home …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Has any one come across issues with AES_ENCRYPT function in MySql

    Convert to raw after encrypt and save as raw data in to the db.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Has any one come across issues with AES_ENCRYPT function in MySql

    Hi Thank you in advance for the replies I will be getting.. Much appreciated. Basically I am running the following mysql query using PDO UPDATE users SET password = AES_ENCRYPT(:password,:supersalt) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Use Dropdown selected value in Mysql Insert

    1. Do not need make new connection in line 30 - use existing 2. If you want to post multiple "room" define field name as array `<select name="room[]">` or `<select …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Use Dropdown selected value in Mysql Insert

    Drop down selection not showing up in MySQL. How do I get the selection from the MySQL-populated drop down list to be a value I can use when creating a …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in white space on the bottom

    Do not include any outside of `<head></head>` and `<body></body>` check line 20 in your code sample
  • Member Avatar for AndrisP
    AndrisP

    Began Watching white space on the bottom

    Hello, Cek this site: www.advance-web-studio.com There is a white space underneath it that I do not know where it comes from. this is my index.php <b>Latest Projects:</b><br><br> <div> <a href="<?php …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Mysqli image fetching issue

    Your method are wrong for BLOBs - read [this](http://php.net/manual/en/mysqli-stmt.send-long-data.php) manual
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Mysqli image fetching issue

    hi, i am new to php. I am trying to fetch the image stored in database by using mysqli but couldnt fetch it. Please help me with this. Please find …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Sql import error

    Show your reference table structure `employees`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Sql import error

    Hello, When I try to import this sql into phpmyadmin I am getting this error message: Query SQL: CREATE TABLE `customers` ( `customerNumber` int(11) NOT NULL, `customerName` varchar(50) NOT NULL, …

The End.