-
Posts
425 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by JamesB
-
-
You can either set $listproduit to false before it is conditionally set to true, or use if(!isset($listproduit))
-
yes, as you see:$mysql = new mysqli('localhost', 'root', '', 'testebase');
When i said to escape the apostrophes, this excludes the first and last per string, as shown in my example:
'my'pass'word'
@Ingolmethe server has no any error indicate before the line 5
Sometimes the error line is off by 1 line, can you post your previous line of code.
-
do you have an apostrophe in your password? if so you need to escape all apostrophes used by putting a backslash before them, eg.
$mysql = new mysqli('localhost', 'root', 'my'pass'word', 'testebase');
-
you need apostrophes around the value to indicate a MySQL string:
$result = $mysql->query("SELECT * FROM trybase WHERE name= '".$_POST['name']."'");
-
You need quotes around $tab in this line:
$menu_res = query("SELECT * FROM menu WHERE menu_file_url = ".$tab);
so:
$menu_res = query("SELECT * FROM menu WHERE menu_file_url = '".$tab."'");
You could have added this line and seen the output was 0.
echo mysql_num_rows($menu_res);
-
http://stackoverflow.com/questions/426258/how-do-i-check-a-checkbox-with-jquery
for (var i = 0; i < myArray1.length; i++) { var row = myArray1[i]; $("#"+row).prop('checked', true);}
-
Can you post your HTML code for the form?
-
I managed to get it working using a timer, I'm not sure which data needs to be updated to avoid using a timer, but it works with an interval of 1 millisecond.
change
maxHeight.expand.call(maxHeight);
to
setTimeout(function() { maxHeight.expand.call(maxHeight); }, 1);
- 1
-
Try changing
<body onload="new ElementMaxHeight();">
to:
<body onload="maxHeight = new ElementMaxHeight();">
and add:
maxHeight.expand.call(maxHeight);
under:
directionsDisplay.setDirections(response);
If that doesn't work can you post a link to your site.
-
Well you do need to use either the search or match method.
http://www.w3schools.com/jsref/jsref_search.asp
-
a general rule for forms is:
validate input
if(input is valid)
{
execute some code, eg. include page2.php to show the confirmation form}
else{
execute some code, eg. include page1.php to show the first form}
-
Are you trying to send data from a html form to php? or from a html form to php then to another php page?
if the latter, you can store the data into a database in the first php page, then in the second php page you can retrieve the data from the database.
sessions might be more applicable though, despite you not wanting to use them.
you can only use 1 action attribute in a html <form> tag.
- 1
-
You would be better off modifying the server-side code to not output the rn.
-
Do you have a new line (with indentation) or any spacing before the </textarea> closing tag?
Also you forgot an equals sign for the value attribute.
-
Back End = Server-side = Code running on the server. eg. PHP, ASP, SQL
Front End = Client-side = Code running on the client. eg. JavaScript, HTML, CSS
http://en.wikipedia.org/wiki/Backbone.js
http://en.wikipedia.org/wiki/Bootstrap_(front-end_framework)
-
Java and JavaScript are 2 completely different languages.
You will need server-side data validation (in PHP).
Client side data validation (in JavaScript) is optional.
Make sure all your form values are being validated in PHP.
-
can you upload the file containing that code?
-
Try adding a space before the } in this:
<?php}
-
That line takes the $color parameter, and sets the "color" property on the object.
$this refers to the object.
$car = new Car("red");
echo $car->color;
-
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
15.1.2.4 isNaN (number)Returns true if the argument coerces to NaN, and otherwise returns false.1. If ToNumber(number) is NaN, return true.2. Otherwise, return false.
9.3.1 ToNumber Applied to the String TypeToNumber applied to Strings applies the following grammar to the input String. If the grammar cannot interpret the String as an expansion of StringNumericLiteral, then the result of ToNumber is NaN.
-
Try removing the single quotes from the select query, and adding a set of () brackets around it instead.It's probably being treated as a string.
-
Hi! Is it possible to have a htaccess file check if the filename in the URL, exists in a certain folder on the server? I have this URL:http://127.0.0.1/mywebsite/directions Which should check if this file exists:<root>/mywebsite/Templates/Pages/directions.php If it doesn't exist, a 404 should be given. I have this code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond /Templates/Pages/%{REQUEST_FILENAME}.php !-fRewriteRule (.*) - [L,R=404] </IfModule>
But it's currently giving a 404 on all pages. Edit:The .htaccess file is at:<root>/mywebsite/.htaccess
-
i'm not 100% sure, but i think the displayed time is only taken from the <time> element's value, <time>here</time>,whereas the non-displayed machine-readable time is taken from 1 of 2 places, the datetime attribute, or the <time> element's value, with the datetime attribute taking priority. http://www.w3.org/TR...me-element.html To set/get the datetime attribute as a string, you can use setAttribute/getAttribute (i'm not sure if theres a better way)eg.I don't understand what, if anything, connects the datetime field to the displayed valueconsole.log( document.getElementById('time1').getAttribute('datetime') );document.getElementById('time1').setAttribute('datetime', d.toISOString());
The toISOString() method seems to give the same date/time format as the datetime attribute.http://www.w3schools...toisostring.asp
-
are you sure imageData is a property of the context object? you might need getImageData() instead.i'm not sure how to use indexOf on an ArrayBuffer, but the loop might be worth a try:
var canvas = document.getElementById("canvas");var ctx = canvas.getContext("2d");var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); var data = imageData.data;var dataLength = data.length; var alphaFound = false;for (var i=0; i<dataLength; i+=4){if (data[i] == 255){alphaFound = true;break;}}
Dynamic menu coding problem
in PHP
Posted
Check the first example on the manual for pathinfo(): http://php.net/manual/en/function.pathinfo.php
PATHINFO_BASENAME