Search Results

Showing results 1 to 40 of 256
Search took 0.03 seconds.
Search: Posts Made By: ShawnCplus ; Forum: PHP and child forums
Forum: PHP 11 Days Ago
Replies: 4
Solved: GD Question
Views: 205
Posted By ShawnCplus
Exactly, like I said. You would have one file say image.php generate the image and in the file you wanted to show the image you'd do

<img src="image.php?someparam=somevalue" />
Forum: PHP 11 Days Ago
Replies: 4
Solved: GD Question
Views: 205
Posted By ShawnCplus
If you want to place it dynamically inside another page you would have one PHP file generate the image and then point to that in an <img> tag.

But to set the content-type just use:...
Forum: PHP 11 Days Ago
Replies: 15
Views: 371
Posted By ShawnCplus
What he said, it's been a long day :)
Forum: PHP 11 Days Ago
Replies: 15
Views: 371
Posted By ShawnCplus
Remove [] from the name of the field, PHP sees that and tries to turn it into an array.
Forum: PHP 12 Days Ago
Replies: 2
Views: 195
Posted By ShawnCplus
time BETWEEN '$endDateTime' AND '$startDateTime' Put quotes around the dates
Forum: PHP 16 Days Ago
Replies: 3
Solved: need HELP
Views: 219
Posted By ShawnCplus
Your first place you should go for any question related to PHP is the PHP documentation: http://php.net/for
Forum: PHP Oct 22nd, 2009
Replies: 2
Views: 201
Posted By ShawnCplus
What do you mean by calling the table? Also, why're you using PDO for the connection then just completely ignoring it and using mysql_query anyway? http://php.net/pdo
Forum: PHP Oct 20th, 2009
Replies: 6
Views: 271
Posted By ShawnCplus
If you see absolutely nothing then you may be getting an error. On the line before $source = ... put ini_set('display_errors', 'On'); error_reporting(E_ALL); If you're getting an error that will show...
Forum: PHP Oct 20th, 2009
Replies: 6
Views: 271
Posted By ShawnCplus
If the file is on the same server as the script then use the absolute path. If it's a remote file use the URL.
Forum: PHP Oct 20th, 2009
Replies: 6
Views: 271
Posted By ShawnCplus
You're not giving a full path, you're giving a web path. In the first example it is making a web request to fetch the file, in the second example it is directly accessing the filesystem. Make sure...
Forum: PHP Oct 20th, 2009
Replies: 7
Views: 240
Posted By ShawnCplus
If you want to save simulations for future use just use a damn database. Don't try to go against the grain when working with PHP. There are plenty of tools as your disposal for working with stuff...
Forum: PHP Oct 20th, 2009
Replies: 7
Views: 240
Posted By ShawnCplus
You can't, use a database. It's that simple.
Forum: PHP Oct 19th, 2009
Replies: 4
Views: 205
Posted By ShawnCplus
As for this, if you're just using it as a learning experience then it should be just that. It's not a very good learning experience if you just follow someone else's tutorial. The point of recreating...
Forum: PHP Oct 19th, 2009
Replies: 4
Views: 205
Posted By ShawnCplus
If you're trying to get the value of $id in that string then you have to concatenate because you're using single quotes.

echo '<a href="profile.php?id=' . $id . '">Enzo's Profile</a>';
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
Now do the same thing, type php -v and paste the output here. If it says something like
PHP 5.2.6 (cli) (built: sometime)
Copyright (c) 1997-2009 The PHP Group
Zend Engine blah blah
Then you have...
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
oh, hahaha, did you also do sudo apt-get install php5-cli?
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
type php -v on the command line and paste the output here.
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
type ls /usr/local/bin and if php isn't in that list then reinstall it.
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
It's #!/usr/bin/env php and if that doesn't work then you didn't install php correctly. If you're using ubuntu or any debian distro it is just sudo apt-get install php5.
Forum: PHP Oct 14th, 2009
Replies: 14
Solved: php5 on linux
Views: 322
Posted By ShawnCplus
This will find the php interpreter for you and use it, don't directly link to it.

#!/usr/bin/env php
Forum: PHP Oct 14th, 2009
Replies: 7
Views: 379
Posted By ShawnCplus
That won't actually get you the value of the hiddenName element though. You would have to do document.getElementById('submittedName').value. But since you're not really setting the value anyway you...
Forum: PHP Oct 13th, 2009
Replies: 2
Solved: XML Issues
Views: 210
Posted By ShawnCplus
http://php.net/simplexml
Forum: PHP Oct 13th, 2009
Replies: 5
Views: 290
Posted By ShawnCplus
If you get no errors and no exception is through but it's still a white page that means the query returned no results. Execute the query directly in MySQL or phpmyadmin or whatever you're using to...
Forum: PHP Oct 13th, 2009
Replies: 7
Views: 379
Posted By ShawnCplus
Holy crap no. Just no. A thousand times no.
Forum: PHP Oct 12th, 2009
Replies: 7
Views: 379
Posted By ShawnCplus
<script type="text/javascript">
function submitForm(val)
{
document.getElementById('submitted').value = val;
document.getElementById('submitted').form.submit();
}
</script>
<form...
Forum: PHP Oct 7th, 2009
Replies: 4
Solved: String Help
Views: 235
Posted By ShawnCplus
http://php.net/preg_match That is all
Forum: PHP Oct 6th, 2009
Replies: 15
Views: 507
Posted By ShawnCplus
What's the error? (also, your code doesn't have an ending brace for the outer if)
Forum: PHP Oct 6th, 2009
Replies: 15
Views: 507
Posted By ShawnCplus
Your query might be failing


$result = mysql_query($sql);
Try

$result = mysql_query($sql);
if (!$result)
{
echo mysql_error();
Forum: PHP Oct 5th, 2009
Replies: 4
Views: 331
Posted By ShawnCplus
Line 49

if ($_POST["$submit"])
// should be
if (isset($_POST['submit']))
Forum: PHP Sep 29th, 2009
Replies: 4
Solved: Undefined index
Views: 257
Posted By ShawnCplus
The server it is working on probably has notices turned off. You should have an if (isset($_POST['username'])) block around that anyway.
Forum: PHP Sep 25th, 2009
Replies: 8
Solved: Recommendations
Views: 283
Posted By ShawnCplus
heh, you can't exactly test load balancing with a ping and I can say without a doubt that if you DoS a hosting company to "test their load balancing" they'll be very quick to send a nicely formatted...
Forum: PHP Sep 24th, 2009
Replies: 3
Views: 387
Posted By ShawnCplus
Show us your current code, we don't know you database schema or what to change if you don't
Forum: PHP Sep 17th, 2009
Replies: 4
Views: 922
Posted By ShawnCplus
Explode on spaces and use ORs for the extra terms. http://php.net/explode
Forum: PHP Sep 10th, 2009
Replies: 3
Views: 294
Posted By ShawnCplus
<?php
// create short variable names
$searchtype=$_POST['searchtype'];
$searchterm=trim($_POST['searchterm']);
if (!$searchtype || !$searchterm) {
echo 'You have not entered search details.';...
Forum: PHP Sep 3rd, 2009
Replies: 2
Views: 363
Posted By ShawnCplus
Well you have an unclosed/broken tag here on line 62 that may be causing issues

<div <!--Div class added by Damion -->

Aside from that grab firebug(http://getfirebug.com) for firefox and toy...
Forum: PHP Sep 3rd, 2009
Replies: 2
Views: 292
Posted By ShawnCplus
Is there some absolutely halting reason that the joomla stuff can't be hosted on the same server? It's not like its that hard to port a database and rsync code
Forum: PHP Sep 2nd, 2009
Replies: 2
Views: 438
Posted By ShawnCplus
Don't try to mix creating your own json strings

$objJSON = array('sample' => null);
// whatever
$objJSON['sample'] = $arr;
$objJSON = json_encode($objJSON);
echo '<script...
Forum: PHP Aug 21st, 2009
Replies: 3
Views: 262
Posted By ShawnCplus
The problem is that get_browser returns an array, not an object. use $b['parent'], not $b->parent
Forum: PHP Aug 14th, 2009
Replies: 12
Views: 1,155
Posted By ShawnCplus
Your example should work the way you want it. There is no dimensioning of arrays in PHP, space is allocated as necessary.
Forum: PHP Aug 13th, 2009
Replies: 2
Views: 206
Posted By ShawnCplus
You use . to concatenate so echo ucwords($_SESSION['fname'] . ' ' . $_SESSION['lname']);
Showing results 1 to 40 of 256

 


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

©2003 - 2009 DaniWeb® LLC