Search Results

Showing results 1 to 40 of 229
Search took 0.02 seconds.
Search: Posts Made By: cwarn23 ; Forum: PHP and child forums
Forum: PHP 5 Days Ago
Replies: 10
Views: 342
Posted By cwarn23
I cleaned up the code a bit and although I don't know much about setting up the arrays in a html form I believe the complete code should look more like the following:
<strong>Update multiple rows in...
Forum: PHP 5 Days Ago
Replies: 10
Views: 342
Posted By cwarn23
That code in it's design is flawed. The following line will cause a lot of trouble:
$sql1="UPDATE $tbl_name SET AcMake='$AcMake[$i]', AcCapacity='$AcCapacity[$i]', AMP='$AMP[$i]', qty='$qty[$i]'...
Forum: PHP 25 Days Ago
Replies: 2
Views: 364
Posted By cwarn23
The following should do the trick the the result being in the $res array
<?php
$var=$_POST['box'];
$i=1;
$res=array();
$var=(empty($var))?array():$var;
foreach ($var AS $val) {
...
Forum: PHP 29 Days Ago
Replies: 12
Views: 530
Posted By cwarn23
I see how that can be handy but another thing I have noticed with sites like google and youtube is that they seem to redirect users to their country code domain meaning there is a separate database...
Forum: PHP 29 Days Ago
Replies: 12
Views: 530
Posted By cwarn23
Just a note on that. Wikipedia receives 1,000 new articles every day and many more edited articles so it is possible to compare Wikipedia to ever changing websites such as Facebook. I guess it is a...
Forum: PHP 30 Days Ago
Replies: 12
Views: 530
Posted By cwarn23
Are you at all familiar with the mediawiki cms. That is the same cms wikipedia uses and it does not spread into millions of tables. Instead it has hundreds of computers that just process the...
Forum: PHP 30 Days Ago
Replies: 12
Views: 530
Posted By cwarn23
Well actually I have been told in the mysql forum that if you design a table so that it has indexing you shouldn't ever need multiple tables for the one job. That is when designed properly because...
Forum: PHP Nov 18th, 2009
Replies: 12
Solved: Echo array
Views: 463
Posted By cwarn23
Maybe my explanation was too short. Sometimes people will do the following:
<?php
$connection = mysql_connect("myserver.com","myuser","mypassword") or die ("Couldn't connect to server.");
$db =...
Forum: PHP Nov 18th, 2009
Replies: 12
Solved: Echo array
Views: 463
Posted By cwarn23
So it displayed something... So we know that you were using the right names but the normal cause of this is an extra line of code. Try the following script.
<?php
$connection =...
Forum: PHP Nov 18th, 2009
Replies: 12
Solved: Echo array
Views: 463
Posted By cwarn23
To test if no rows are found try the following:
while( $data2 = mysql_fetch_array($query)) {
echo $data2[0];
echo $data2[1];
echo $data2[2];
}
The nothing is displayed then that means there...
Forum: PHP Nov 17th, 2009
Replies: 12
Solved: Echo array
Views: 463
Posted By cwarn23
Replace lines 11 to 13 with the following
echo $data2['firstname'];
echo $data2['lastname'];
echo $data2['task'];
Forum: PHP Nov 17th, 2009
Replies: 19
Solved: auto refresh
Views: 587
Posted By cwarn23
Just to make it clear - indeed there should be no echos before the header().
Forum: PHP Nov 17th, 2009
Replies: 19
Solved: auto refresh
Views: 587
Posted By cwarn23
That is correct from what I have read in the past.
Forum: PHP Nov 17th, 2009
Replies: 4
Views: 502
Posted By cwarn23
Perhaps this:
<?php
mysql_connect(HOST,USER,PASS);
@mysql_select_db("db303278079") or die( "Unable to select database");
$query="SELECT * FROM restaurants";
$result=mysql_query($query);...
Forum: PHP Nov 17th, 2009
Replies: 19
Solved: auto refresh
Views: 587
Posted By cwarn23
Well actually the entire page will be process by php unless the exit; statement is placed there. So for example if you have a mysql insert it will insert before redirecting unless the exit; is placed...
Forum: PHP Nov 17th, 2009
Replies: 4
Views: 275
Posted By cwarn23
If you want wildcards then the following contains the wildcards:
$sql = 'SELECT * FROM device WHERE `device_num` LIKE "%'.mysql_real_escape_string($val_d).'%" OR `dib` LIKE...
Forum: PHP Nov 17th, 2009
Replies: 19
Solved: auto refresh
Views: 587
Posted By cwarn23
<?php
header("Location: http://yoursite.com/index.php");
exit;
//above must be at very top before any browser output
Forum: PHP Nov 17th, 2009
Replies: 3
Views: 586
Posted By cwarn23
Try adding the following to the top of your php file(s)
setcookie ('PHPSESSID', $_COOKIE['PHPSESSID'], time()+172800);
Forum: PHP Nov 17th, 2009
Replies: 4
Views: 275
Posted By cwarn23
Try replacing it with the following:
$sql = 'SELECT * FROM device WHERE `device_num` LIKE "'.mysql_real_escape_string($val_d).'" OR `dib` LIKE "'.mysql_real_escape_string($val_dp).'"';
Forum: PHP Nov 16th, 2009
Replies: 4
Solved: xampp
Views: 318
Posted By cwarn23
I would have to say if you managed to get XAMPP working then good, keep it as XAMPP has a few minor additional features that WAMP doesn't have (eg. mailserver) although the installation for XAMPP is...
Forum: PHP Nov 14th, 2009
Replies: 3
Solved: need HELP
Views: 251
Posted By cwarn23
Try the following:
<?php
require_once('config.php');

for ($i=1;$i<11;$i++) {
$aid='aid'.$i;
$$aid=$_POST['Question-'.$i];

$qid='qid'.$i;
$$qid=$_POST['qid'.$i];
Forum: PHP Oct 29th, 2009
Replies: 5
Views: 296
Posted By cwarn23
You may want to note that for assigning a possibly undefined variable or array index/key the following is the correct method.
$PK = (isset($_POST['PK']))?$_POST['PK']:'';
The above is what line 24...
Forum: PHP Oct 11th, 2009
Replies: 3
Views: 328
Posted By cwarn23
Your links are all pointing to the wrong location and should be something like as follows: <?php
//REMEMBER TO CONNECT TO DATABASE!

$show_all=$_POST['rg01']; // Show All
//echo $show_all;
...
Forum: PHP Sep 28th, 2009
Replies: 12
Solved: Zip Codes
Views: 371
Posted By cwarn23
Why won't that work. Is there something in the included library that prevents it working. The only thing I would suggest is escaping the variable $key like the following:$zips =...
Forum: PHP Sep 28th, 2009
Replies: 5
Solved: Posting Issue
Views: 193
Posted By cwarn23
From my experience yes it is.
Forum: PHP Sep 25th, 2009
Replies: 8
Solved: Recommendations
Views: 298
Posted By cwarn23
I entered in the specs of the plan I'm on with my host and it's over double the price. If there was something like that where you can decide cpu, storage space and bandwidth for a third of the price...
Forum: PHP Sep 25th, 2009
Replies: 5
Views: 842
Posted By cwarn23
To retrieve the variable param from the url simply use $_GET['param'] to get its value.
Forum: PHP Sep 24th, 2009
Replies: 8
Solved: Recommendations
Views: 298
Posted By cwarn23
I did a google search and the following link might be of great interest to you. http://www.m6.net/ Enjoy.
Forum: PHP Sep 16th, 2009
Replies: 3
Views: 449
Posted By cwarn23
That part of the syntax is totally wrong. I don't think that an include is not meant to be in an if statement. Also replace the include with the require function which does the same thing but with...
Forum: PHP Sep 13th, 2009
Replies: 6
Solved: <?php vs. <?
Views: 414
Posted By cwarn23
Try rebooting the apache httpd service. I've noticed on windows rebooting the computer doesn't restart the httpd service so you will need to go into your controll panel to restart the apache httpd...
Forum: PHP Sep 12th, 2009
Replies: 6
Solved: <?php vs. <?
Views: 414
Posted By cwarn23
Well a server can have several php.ini files and only one of them are really used. So make sure the php.ini file you changed is the same one as listed when you use the following code:
<?php...
Forum: PHP Sep 12th, 2009
Replies: 2
Views: 317
Posted By cwarn23
Perhaps the following:
//get username
$username='Bill Gates';
//validate
$username=mysql_real_escape_string($username);
//set the sql query
$result=mysql_query('SELECT * FROM `table` WHERE...
Forum: PHP Sep 11th, 2009
Replies: 4
Views: 435
Posted By cwarn23
What's the problem or is this solved?
Forum: PHP Sep 11th, 2009
Replies: 4
Views: 435
Posted By cwarn23
In future please use code tags as this is not your first post. Also the following code should do the trick:
$category_id=mysql_real_escape_string(stripslashes($_POST['category_id']));...
Forum: PHP Sep 11th, 2009
Replies: 16
Views: 786
Posted By cwarn23
In Ubuntu. ok. I found this problem when I first got a Virtual Private Server. The server had a different file structure than what my Ubuntu did. So try to browse around your server to make sure...
Forum: PHP Sep 11th, 2009
Replies: 16
Views: 786
Posted By cwarn23
No error. That's because you didn't echo the exec function. Line 18 should be as follows:
echo exec($createBackup);
Forum: PHP Sep 10th, 2009
Replies: 6
Solved: What's Wrong??
Views: 268
Posted By cwarn23
Try replacing line 11 with the following:
$file[] = str_replace(" ","_",$_POST[$files1]);
Forum: PHP Sep 10th, 2009
Replies: 6
Solved: What's Wrong??
Views: 268
Posted By cwarn23
Try on line 34 the following code and tell us the results:
echo '<xmp>'; print_r($file_names); echo '</xmp>';
That should dump the keys and values of the array. They don't always have numbers...
Forum: PHP Sep 9th, 2009
Replies: 13
Views: 1,330
Posted By cwarn23
I believe it is the break; code in the switch statement. That is why I suggested replacing it with an if statement. But obviousley there is something fishy going on with the $returnCode variable.
Forum: PHP Sep 9th, 2009
Replies: 13
Views: 1,330
Posted By cwarn23
Weird. Should have worked. :?:
Below is another piece of code you can try and hopefully it should work.
$returnCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($returnCode!=='200' ||...
Showing results 1 to 40 of 229

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC