Forum: ColdFusion Sep 11th, 2009 |
| Replies: 1 Views: 951 The lock is written into the query. You'll need to check into the correct syntax for your specific database. |
Forum: PHP Sep 3rd, 2009 |
| Replies: 4 Views: 291 http://www.sitepoint.com/article/guide-url-rewriting/ |
Forum: ColdFusion Aug 2nd, 2009 |
| Replies: 2 Views: 1,212 Why do you need regex for this? Can you not use basic string functions like LEFT, MID, and RIGHT? |
Forum: JavaScript / DHTML / AJAX Jun 23rd, 2009 |
| Replies: 2 Views: 327 You could also do this with frames |
Forum: PHP Apr 30th, 2009 |
| Replies: 6 Views: 1,509 You'll have to use your isp's SMTP server.
See here:http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html |
Forum: VB.NET Apr 2nd, 2009 |
| Replies: 2 Views: 921 Here's (http://www.vb-helper.com/howto_net_get_drive_information.html) a tutorial. Make sure you add the COM reference that it talks about in the first paragraph.
This is what it showed for my... |
Forum: MySQL Apr 2nd, 2009 |
| Replies: 6 Views: 623 Well, if the uid is a numeric datatype, you could use:
SELECT COUNT(uid) FROM tracking WHERE uid = $trackuid
If not numeric, you'll have to surround with quotes:
SELECT COUNT(uid) FROM... |
Forum: MySQL Apr 2nd, 2009 |
| Replies: 1 Views: 435 I will restrain from lecturing on normalization (http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html). I assume you've probably never heard of it but I'd highly recommend looking... |
Forum: MySQL Apr 2nd, 2009 |
| Replies: 6 Views: 623 Count is an aggregate function. It's not going to return anything from the database. It's only going to count the number of records matching your criteria and return the total. |
Forum: PHP Mar 29th, 2009 |
| Replies: 8 Views: 1,417 Echo the variable into the xml.
<?php $imagea= 'http://localhost/personal_trainer_system/images/Bench.jpg'?>;
myImage['blue'] = new Image();
myImage['blue'].src = <?php echo $imagea; ?>; |
Forum: PHP Mar 29th, 2009 |
| Replies: 8 Views: 1,417 You'll either have to give the xml file a .php extension, or set Apache to parse php in xml files. This can be done with the http.conf file or with a .htaccess file. If you don't have access to the... |
Forum: HTML and CSS Mar 24th, 2009 |
| Replies: 2 Views: 1,744 By default, divs are block level elements, and won't allow other elements to lay next to them. You can fix this by setting the inner divs style to either float:left and float:right, or you can use... |
Forum: HTML and CSS Mar 21st, 2009 |
| Replies: 6 Views: 546 Change your css back to what you had before and then add this:
ul ul{
padding-left:20px
}
Adjust the padding to your needs. |
Forum: HTML and CSS Mar 21st, 2009 |
| Replies: 6 Views: 546 Your code is correct. The problem is the * in the css. Particularly the padding. With * {
margin: 0;
padding: 0;
}you've reset the padding of all elements to 0. By default, the browser adds... |
Forum: PHP Mar 13th, 2009 |
| Replies: 2 Views: 534 Use substr function. Note, I also used strpos in the example to ensure that the last word isn't broken up.
<?php
$str="The quick lazy fox jumps over a lazy dog.";
$space=" ";... |
Forum: PHP Mar 3rd, 2009 |
| Replies: 2 Views: 1,463 Sometimes it's easier to tell php which html to send to the client, based on a condition. Simple example:
<?php
$show="invalid";
if($show=="valid"){
?>
<div>You get to see this content</div>... |
Forum: PHP Mar 1st, 2009 |
| Replies: 5 Views: 788 Read this:
http://www.seocompany.ca/software/free-encryption-software.html |
Forum: PHP Feb 27th, 2009 |
| Replies: 5 Views: 2,333 Yes, the same for more fields. Basically, if you add a text field into the form, you'll need to update the javascript variable, postr on line 52 above so that it will send the value to the php file. ... |
Forum: PHP Feb 26th, 2009 |
| Replies: 26 Views: 2,053 Actually, I modified your query to test the code in my db prior to posting and it outputted "No rows retrieved'". Also, when I run the code like so:
$sql = 'SELECT * FROM `absent faculty table`... |
Forum: PHP Feb 26th, 2009 |
| Replies: 18 Views: 3,388 Rewrite rules don't actually hide the query string. Rewrite rules pretty much convert seo friendly urls into the actual query string.
Example .htaccess:
RewriteEngine on
RewriteRule... |
Forum: PHP Feb 26th, 2009 |
| Replies: 26 Views: 2,053 You have to get the number of rows.
$a = "SELECT * FROM a WHERE b = c";
$b = mysql_query($a);
$num_rows = mysql_num_rows($b);
if($num_rows == 0) {
echo "No rows retrieved";
} else {
echo... |
Forum: PHP Feb 26th, 2009 |
| Replies: 5 Views: 2,333 Here is a simple AJAX form submission using POST. It basically sends the first and last name to the server, and the server outputs the form information and the date on the server. Very simple, but... |
Forum: ColdFusion Feb 25th, 2009 |
| Replies: 2 Views: 1,382 Have you added a loop to display the output?
<cfquery name="players" datasource="connsilvereagles">
SELECT *
FROM player
ORDER BY playernumber DESC</cfquery>
<cfoutput>
<table>
<cfloop... |
Forum: PHP Feb 21st, 2009 |
| Replies: 3 Views: 500 The file is included inline and parsed just like the contents of the file would be if they were placed there instead. A standard include for the content could be something like:
content.php:
<div... |
Forum: PHP Jan 27th, 2009 |
| Replies: 4 Views: 562 Either disable html messages or look into using BBCode |
Forum: PHP Jan 26th, 2009 |
| Replies: 4 Views: 562 Use captcha (http://www.white-hat-web-design.co.uk/articles/php-captcha.php). |
Forum: PHP Jan 21st, 2009 |
| Replies: 14 Views: 629 You've got to make it a link:
$link = "<a href='".BASE_URL . 'activate.php?x=' . urlencode($e) . "&y=$a'>".BASE_URL."</a>"; |
Forum: PHP Jan 21st, 2009 |
| Replies: 14 Views: 629 What does echo $link; output? |
Forum: HTML and CSS Jan 21st, 2009 |
| Replies: 7 Views: 617 So are you wanting the link content to fill the white box? |
Forum: PHP Jan 21st, 2009 |
| Replies: 4 Views: 609 So did you get everything to work? |
Forum: HTML and CSS Jan 21st, 2009 |
| Replies: 7 Views: 617 I would need a link to the page to see exactly what's happening, but yes it can be done with javascript. |
Forum: Site Layout and Usability Jan 19th, 2009 |
| Replies: 2 Views: 875 You need to integrate a server side language such as php/asp/jsp/coldfusion to automatically update the database. You shouldn't be creating a new page for each user. You should have one template... |
Forum: PHP Jan 19th, 2009 |
| Replies: 4 Views: 609 Well are you trying to compare the value of $lengths[2] to 25 or set $lengths[2] equal to 25?
if ($lengths[2] = 25) {
This code is resetting the value of $lengths[2] to 25 and will result in... |
Forum: PHP Jan 17th, 2009 |
| Replies: 1 Views: 309 Look into using sessions for authentication. Basically the idea is:
<?php
session_start();
if($_SESSION['loggedIn']==true){
echo "This content will only be viewable for users who are logged... |
Forum: PHP Jan 16th, 2009 |
| Replies: 6 Views: 987 Ok, well try this:
$arrivaldate = mysql_real_escape_string(date("Y-m-d",strtotime($_POST['arrivaldate'])); |
Forum: PHP Jan 16th, 2009 |
| Replies: 6 Views: 987 Yeah, I'd say something like:
$arrivaldate = mysql_real_escape_string(strtotime($_POST['arrivaldate']));
would work. Try it out and post back. |
Forum: PHP Jan 16th, 2009 |
| Replies: 6 Views: 987 You'll want to format the date back prior to doing the insert. So, in the script you use to process the form data, use strtotime to convert the string to a timestamp. Then insert the data. |
Forum: PHP Jan 12th, 2009 |
| Replies: 3 Views: 494 You could use str_replace function to replace "//" with "/".
$uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'uploaded_files/';
$uploadsDirectory =... |
Forum: PHP Jan 11th, 2009 |
| Replies: 2 Views: 394 If the user_id data type is numeric, then it won't need single quotes in the sql.
$sql = mysql_query("INSERT INTO shoutbox (index, user_id, username, message) VALUES(' ', $user_id, '$username',... |
Forum: MySQL Jan 10th, 2009 |
| Replies: 3 Views: 531 You could start off with basic data validation. Pumping all of the fields into the db without checking even one of them? That's just asking for injection. |