Search Results

Showing results 1 to 40 of 165
Search took 0.01 seconds.
Search: Posts Made By: R0bb0b ; Forum: PHP and child forums
Forum: PHP Oct 16th, 2008
Replies: 12
Views: 2,719
Posted By R0bb0b
You didn't close the if statement at line 7, this should work:

<?php
include 'config.php';
mysql_connect("$host", "$username", "$password")or die("cannot connect"); ...
Forum: PHP Oct 16th, 2008
Replies: 12
Views: 2,719
Posted By R0bb0b
Could you post your updated code? I'll test it.
Forum: PHP Oct 16th, 2008
Replies: 12
Views: 2,719
Posted By R0bb0b
did you capitalize "If($result)" in your code? I'm pretty sure that won't work. If so, change it to "if($result)"

$_get is suppose to be $_GET

That's all that I see off the top of my head,...
Forum: PHP Oct 15th, 2008
Replies: 12
Views: 2,719
Posted By R0bb0b
You have an odd number of brackets here

if($result){
{
echo("<br>Category deleted");
}
else{
echo("Failed to Delete category");
}
Forum: PHP Oct 15th, 2008
Replies: 12
Views: 2,719
Posted By R0bb0b
So what do you know is happening? Meaning, at what points in your processing script(code that the form is submitted too) does focus reach? Does this make sense?

I'm not asking for a diagnosis of...
Forum: PHP Oct 9th, 2008
Replies: 4
Views: 462
Posted By R0bb0b
Are you trying to concatenate the strings?
$to_email = "erich.krauz@rgl-e.com" . ", krauz2@hotmail.com";

this would be
$to_email = "erich.krauz@rgl-e.com, krauz2@hotmail.com";
Forum: PHP Oct 9th, 2008
Replies: 4
Views: 462
Posted By R0bb0b
Could you expand on this. This is two commands on the same line but because you are using the same variable, the first command is pointless. What are you trying to do?
Forum: PHP Oct 8th, 2008
Replies: 31
Solved: Syntax Errors
Views: 2,307
Posted By R0bb0b
Either way, this is still not going to work because you are closing your first function with an open bracket

<?
$conf = mysql_fetch_array(mysql_query("SELECT * FROM config WHERE id = 1"));...
Forum: PHP Oct 7th, 2008
Replies: 31
Solved: Syntax Errors
Views: 2,307
Posted By R0bb0b
Here are your first 34 lines

<?
$conf = mysql_fetch_array(mysql_query("SELECT * FROM config WHERE id = 1"));
function check_credits($email,$credits)
{
$user = get_user_info_email($email);...
Forum: PHP Oct 7th, 2008
Replies: 31
Solved: Syntax Errors
Views: 2,307
Posted By R0bb0b
This says that it is expecting one of these "{". Is this the entire code from this file?
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
Do you really think the votes will get that high? Your talking about exceeding the allowed integer limit? If you use a mediumint, that's 8388607/5 and over 1.5 million votes. Mediumint only takes...
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
OK, so what you are doing in your code is taking the current rating, adding the new rating to it, averaging that by dividing that by all votes. This will not work because you are not preserving the...
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
Your calculations are not correct if you are looking for an average, I have just gotten busy and will have to get back to you on the error shortly.
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
I see it now, wouldn't work if firefox, switched to IE and I can see where the images are suppose to be. Only the rollovers work. Attached is what I see. Could have something to do with the...
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
I see a button to add to basket but I don't see a button to vote
Forum: PHP Oct 6th, 2008
Replies: 15
Views: 1,658
Posted By R0bb0b
Why do you have to have "limit 1" on your update queries, is "pid" not your primary key. If not, maybe you are having issues with duplicate rows? This could produce unpredictable results.
Forum: PHP Oct 6th, 2008
Replies: 1
Views: 761
Posted By R0bb0b
Not really, just when you start doing it, it becomes habit forming. Its great for auto filling form fields like drop down lists and checkboxes, so in that case yes, it makes it much easier to read.
Forum: PHP Oct 5th, 2008
Replies: 31
Solved: Syntax Errors
Views: 2,307
Posted By R0bb0b
Think about it this way, php is trying to tell you the correct line the error is on, But it is usually unable to if there is a syntax error because the interpreter is unable to parse the file...
Forum: PHP Oct 4th, 2008
Replies: 31
Solved: Syntax Errors
Views: 2,307
Posted By R0bb0b
and post all of your code from require.inc.php because this is not 43 lines

function footer() {
?>
<CENTER>
<table>
<tr>
<td class="font"align=center><a...
Forum: PHP Oct 4th, 2008
Replies: 5
Views: 714
Posted By R0bb0b
I usually use htmlspecialchars() on the way out of the database because they pose no threat to the database as long as you use mysql_real_escape_string() and other proper measures to ensure data...
Forum: PHP Oct 1st, 2008
Replies: 3
Views: 540
Posted By R0bb0b
That should be fine, if it doesn't run check the file permissions.
Forum: PHP Oct 1st, 2008
Replies: 3
Views: 540
Posted By R0bb0b
If you take the time to learn php a little you will find that the php and asp are very similar. Of course their are a few slight differences like function names and array declaration and management...
Forum: PHP Sep 30th, 2008
Replies: 3
Views: 1,101
Posted By R0bb0b
try this

$query = sprintf("select venue,count(venue) as frequency from matches WHERE Away = 'England' group by venue ORDER BY frequency DESC limit 300");
Forum: PHP Sep 28th, 2008
Replies: 9
Views: 1,154
Posted By R0bb0b
I forget if you can do "colname, *" in the column list in a select query in mysql. I know you can in postgres, sometimes I forget that mysql doesn't have as many features as postgres. You may have...
Forum: PHP Sep 28th, 2008
Replies: 9
Views: 1,154
Posted By R0bb0b
<?php

$cmid=$_GET['id'];

$query="SELECT date_format(date '%d/%m/%Y') AS formatted_date, * FROM newscomment WHERE news_id='$cmid'";
//$test="SELECT date_format(date '%d/%m/%Y') AS...
Forum: PHP Sep 28th, 2008
Replies: 9
Views: 1,154
Posted By R0bb0b
I don't see where you are trying to pull the data from the database to incorporate it into. you need to start with a select sql clause and then loop through the results displaying each desired row.
Forum: PHP Sep 27th, 2008
Replies: 9
Views: 1,154
Posted By R0bb0b
or you could select it this way

select date_format(date '%d/%m/%Y') as formatted_date from tablename;
Forum: PHP Sep 25th, 2008
Replies: 2
Views: 569
Posted By R0bb0b
I've never used it with the last "/" on the dirname but this should work
mkdir("/inventory/newFolder");

that is if you have write permission in the "inventory" folder.

this should also work...
Forum: PHP Sep 24th, 2008
Replies: 4
Solved: php echo
Views: 665
Posted By R0bb0b
This seems to work OK, just put your images in a folder under the document root called "rdo" and name your images to be the same as the value of the radio button, just replace the spaces with...
Forum: PHP Sep 24th, 2008
Replies: 4
Solved: php echo
Views: 665
Posted By R0bb0b
This should work

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>...
Forum: PHP Aug 29th, 2008
Replies: 16
Views: 1,720
Posted By R0bb0b
Plus, .net goes where Microsoft wants it to go, where as PHP goes where the community wants it to go. I like the community.
Forum: PHP Aug 21st, 2008
Replies: 10
Views: 1,188
Posted By R0bb0b
OK, the following code is, probably as you already know, brings the data down from the database and adds the total number of rows of data brought down into the variable $total.

$query = "SELECT...
Forum: PHP Aug 20th, 2008
Replies: 10
Views: 1,188
Posted By R0bb0b
This should do it

<?
$query = "SELECT count(vote) as total, vote FROM `votes` group by vote order by vote";
$result = mysql_query($query);
$total = mysql_num_rows($result);

$variablekeys =...
Forum: PHP Aug 19th, 2008
Replies: 6
Views: 859
Posted By R0bb0b
replace:
echo $row_test;?>

with
echo $row_test['total'];?>
Forum: PHP Aug 19th, 2008
Replies: 4
Solved: Ajax switch
Views: 1,119
Posted By R0bb0b
Are you sure, did you put an alert() in the function to see?
Forum: PHP Aug 18th, 2008
Replies: 6
Views: 859
Posted By R0bb0b
Total:

select sum(`Amount`) as total from `sample`;


Total Records:

select count(`pmtID`) as total from `sample`;
Forum: PHP Aug 18th, 2008
Replies: 5
Views: 657
Posted By R0bb0b
You are being way too vague here, why don't you post what you have done so far and maybe someone might be able to help you.
Forum: PHP Aug 18th, 2008
Replies: 3
Solved: PHP Dates
Views: 462
Posted By R0bb0b
no problem.
Forum: PHP Aug 18th, 2008
Replies: 4
Views: 559
Posted By R0bb0b
do a find and replace in your script for the following:
replace ‘ with '
replace ’ with '
Forum: PHP Aug 18th, 2008
Replies: 3
Solved: PHP Dates
Views: 462
Posted By R0bb0b
<?
$mysql_date = "2008-08-17";
list($y, $m, $d) = explode("-", $mysql_date);
echo date("m/d", mktime(0, 0, 0, $m, $d, $y));
?>
Showing results 1 to 40 of 165

 


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

©2003 - 2009 DaniWeb® LLC