-
Began Watching help i used forms html with php and getting the wrong email!
this is the html: <!--this is my best site so dont look up here and steal!--> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows 1252"> </head> <body> <table bgcolor="white" align="center" … -
Replied To a Post in getting “mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean
For first: $id = $_GET['id']; $action = $_GET['action']; is not good practice! It raise PHP error if not set. All request variables initialize like this: $id = ( isset($_GET['id']) ? … -
Began Watching getting “mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean
Hi!, I am getting a warning message while trying to update values in textfield but the values are getting updated in database. here is my code, <?php $id = $_GET['id']; … -
Replied To a Post in How to use PHP variable as a html variable?
Try this: <?php $num=array(rand(), rand(), rand(), rand(), rand()); for($i=0;$i<5;$i++) echo '<input type="number" value="'.$num[$i].'">'; ?> Your array is empty -
Began Watching How to use PHP variable as a html variable?
how to use php variable as a html variable? <?php $num=array(); for($i=0;$i<5;$i++) echo '<input type="number" name="$num[$i]">'; ?> i need to display the inputted number in the array. it's not working. … -
Replied To a Post in proper placement of ID on img tags.
Both order is valid but attribute "alt" is necessary for valid "img" tag -
Began Watching proper placement of ID on img tags.
just curious. <img src="filepath.jpeg" id="idhere?" /> or <img id="idhere?" src="filepath.jpeg" /> which is valid? are they both vaild? and differences? -
Began Watching Count even and odd numbers
idk why my program is not working, i wanted to create a program that counts even and odd number when a user inputs number except 0. Zero is the terminator … -
Replied To a Post in Count even and odd numbers
In your example "0" is terminator but "0" allways incrases "even". Check `if(entNum==0){ break; }` after scanf. More convenient is binary compare to 1 for test even and odd in … -
Began Watching Hard Disk Full cannot Track
Hello Daniweb Users, I just want to know when doing the command "df -lh" my /dev/sda1 got 100% I do transfer some of the files but still it can be … -
Replied To a Post in Hard Disk Full cannot Track
Check your trash size -
Began Watching Please explain
Hello friends, I am having a confusion in my script please explain me what is it doing i don't know what it is i don't understand sessions very well, so … -
Replied To a Post in Please explain
`$_SESSION['SBUser']` is session variable. You can set it if session is started see http://php.net/manual/en/book.session.php and dont put PHP variables directly to the SQL query! $query = $db->query("SELECT * FROM users … -
Began Watching Javascript arrays
I am new to coding and im having trouble with arrays in javascript. I want to be able to compare stuff inside an array but only if the three values … -
Replied To a Post in Javascript arrays
Missed comma between arrays `var array = [[1,2,3][4,5,6][3,6,7]]` replace to `var array = [[1,2,3],[4,5,6],[3,6,7]]` -
Replied To a Post in How to run multiple python file in a folder one after another
@Gribouillis Actually no its easy way to call python scripts from shell script file. Versions of Python declare in a `.py` file starts like `#!/usr/bin/python` or `#!/usr/bin/python3` or other -
Replied To a Post in How to run multiple python file in a folder one after another
You dont need python command. Make shell script executable and python scripts executable. e.g. if you put in terminal `cd /full/path/to/python` "Enter" and then put `a.py` "Enter" then do not … -
Began Watching How to run multiple python file in a folder one after another
Hi I have around 20 python files. Each time I run these files in the terminal this form one after another : python a.py python b.py python c.py python d.py … -
Replied To a Post in How to run multiple python file in a folder one after another
You can put all in a shell script file e.g. "run_py_files.sh" /full/path/to/python/a.py /full/path/to/python/b.py /full/path/to/python/c.py /full/path/to/python/d.py /full/path/to/python/e.py /full/path/to/python/f.py /full/path/to/python/g.py make it executable and call only one shell script -
Began Watching help with OOP
Hello guys, i'm trying to show the full name of my user what is logged in. I am new to writing in oop. Im getting a undifined index fullname error. … -
Replied To a Post in help with OOP
and don't put php variables directly in to the SQL query use bind_param instead http://php.net/manual/en/mysqli-stmt.prepare.php -
Began Watching SVG Element Size
Anyone familar with how to shrink the width & height without effecting the size of the SVG. As has a huge space around the SVG file and I must get … -
Replied To a Post in SVG Element Size
SVG example ("width" and "height" similar to "viewBox"): <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="150" height="150" viewBox="0 0 150 150"> <rect x="0" y="0" … -
Began Watching How to get value of unchecked checkbox in a form?
Hi, I am creating a form in jsp. <form action="" method="post"> <input type="hidden" name="status_1" value="0" /> <input type="checkbox" id="status_1" name="status_1" value="1" /> <input type="hidden" name="status_2" value="0" /> <input type="checkbox" id="status_2" … -
Replied To a Post in How to get value of unchecked checkbox in a form?
In your example you trying send to server two variables by same name. I think more convenient is array of checkboxes with binary step values e.g. <form action="" method="post"> <input … -
Began Watching How to display form elements in xml using php?
XML - <?xml version='1.0' encoding='UTF-8'?> <Form name='Demo' id='DemoID' searchname='Demo' search='Demo' org='Yes' > <Field name='IdentificationNumber' datatype='String' control='InputText' length='10' search='Yes' /> <Field name='Country' datatype='String' control='InputText' length='50' search='Yes' /> </Form> PHP - <!DOCTYPE … -
Replied To a Post in How to display form elements in xml using php?
If you replace to print recursive then you can see structure of the generated XML object <!DOCTYPE html> <html> <body> <pre> <?php $xml=simplexml_load_file("demo.xml") or die("Error: Cannot create object"); print_r($xml); ?> … -
Began Watching LAN Connection speed
Hi All, The problem I have is that the port on my laptop NIC is meant to have gigabit capability, but I am only connecting at 100.0Mbps and I don't … -
Replied To a Post in LAN Connection speed
For first check your patch cable - connection 10mbps or 100mbps used 2 pairs only (4pin) but 1000mbps used all 4 pairs (8pin) and very important that all eight would … -
Began Watching Error 00936 with Oracle
I'm getting this (errorORA-00936: missing expression) when I input this into the sql commands: select || 'The promotion began on the' || to_char(start_date,'ddth')' of 'to_char(start_date,'Month YYYY') from f_promotional_menus where code=110; … -
Replied To a Post in Error 00936 with Oracle
Your mistake is concatenate simbol before first string "||" -
Began Watching Get dynamic column name in Update Query in mysql
I have two tables tbl_lang and tbl_unicode as described below: tbl_lang lang_id lang_name lang_code 1 Français fr 2 العربية ar 3 Deutsche ge tbl_unicode ent_id ent_name fr ar ge 1 … -
Replied To a Post in Get dynamic column name in Update Query in mysql
You can create stored procedure like this: DELIMITER $$ DROP PROCEDURE IF EXISTS `dinamic_update`$$ CREATE PROCEDURE `dinamic_update`( IN p_lang_name VARCHAR(30), IN p_ent_id INT, IN p_new_value VARCHAR(30) ) BEGIN SELECT `lang_code` … -
Began Watching Compare Tables
Hello Daniweb Community, I've been looking around online for help with this but I can't seem to find a way to get a query to do what I want. The … -
Replied To a Post in Compare Tables
I think you need RIGHT JOIN something like this: DROP TABLE IF EXISTS `products`; CREATE TABLE `products`( `prod_id` INT PRIMARY KEY ,`prod_name` VARCHAR(30) ,`prod_descr` VARCHAR(90) ,`prod_price` DECIMAL(7,2) ,`prod_stock` INT ,`prod_date` … -
Began Watching SQL Like Command - how to find records without 1-9 but using 0
Hey ! I'm looking for sql 'like' command help.... I had mysql database and it had settlement table. On that table there is column named 'settlement'. In the settlement column … -
Replied To a Post in SQL Like Command - how to find records without 1-9 but using 0
I think `NULLIF(settlement, 0) IS NULL` is better than `settlement < 0.01 or settlement IS NULL` Try this: SELECT * FROM settlement WHERE NULLIF(settlement, 0) IS NULL -
Began Watching Having a problem with my script
So I'm trying to make a script that prompts for two strings, then searches the second string to see if it contains the first using a function triggered by a … -
Replied To a Post in Having a problem with my script
1. Function "indexOf()" returns number not boolean. If not found "-1" else position "0" or higher 2. Search string is argument: "string".indexOf("ring") return "2", but "ring".indexOf("string") return "-1" -
Replied To a Post in Loop "insert" statement in PHPmyAdmin
If problem is solved then mark thread as solved -
Began Watching Loop "insert" statement in PHPmyAdmin
Hello All. I'm trying to loop the following statement with PHPmyAdmin in order to add 1000 entries with the variable "i" incremented for each entry. (data and ip can be … -
Replied To a Post in Loop "insert" statement in PHPmyAdmin
CREATE TABLE `test_table`( `id` INT NOT NULL AUTO_INCREMENT, `data` DATE, `ip` VARCHAR(30), PRIMARY KEY (`id`) ); DELIMITER $$ DROP PROCEDURE IF EXISTS insert_data; $$ CREATE PROCEDURE insert_data(IN p_cur INT, IN … -
Began Watching fetch data from database on select multiple checkbox
<form action="checkbox.php" method="post"> <div class="checkbox"> <label><input type="checkbox" name="size[]" value="s">S</label> </div> <div class="checkbox"> <label><input type="checkbox" name="size[]" value="m">M</label> </div> <div class="checkbox"> <label><input type="checkbox" name="size[]" value="l">L</label> </div> <div class="checkbox"> <label><input type="checkbox" name="size[]" value="xl">Xl</label> … -
Replied To a Post in fetch data from database on select multiple checkbox
<?php $selectedSizes = ( isset($_POST[size]) ? implode(",", $_POST[size]) : "" ); $sql = "SELECT * FROM `your_table_name` t WHERE FIND_IN_SET(t.`size_field`, ?)"; // then bind param $selectedSizes and execute query ?> -
Began Watching Help with the plain HTML form with JavaScript
Hi, I'm new to javascript that i didn't learn in college. My form can validate the first name, last name, and address line 1, but cannot validate the phone number … -
Replied To a Post in Help with the plain HTML form with JavaScript
In HTML5 you can validate this without JS. If you change input type text to input type tel and input type email. Use attribute pattern for vaidate input type tel … -
Began Watching call js function from form action
I am working on integrate some php file with my platform. The platform using HTML for interface and js file for functionality. I try two appraches: First approach: I call … -
Replied To a Post in call js function from form action
You can change <form enctype='multipart/form-data' id = "myform"> <input type='submit' value='Basic search' onclick="i2b2.BLAST.jsFunction()"> to <form enctype="multipart/form-data" id="myform" onsubmit="i2b2.BLAST.jsFunction(); return false;"> <input type="submit" value="Basic search" > then your function call when … -
Began Watching Target Class in Script
I'm trying to target a class within a script in console.log in Chrome; I get an error ClassName is not defined ? if (getElementByClassName("class-name")){ document.write("correct class") }; - I wish … -
Replied To a Post in Target Class in Script
Replace "getElementByClassName" to "getElementsByClassName"
The End.