Forum: PHP Oct 16th, 2008 |
| Replies: 12 Views: 2,729 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,729 Could you post your updated code? I'll test it. |
Forum: PHP Oct 16th, 2008 |
| Replies: 12 Views: 2,729 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,729 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,729 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 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 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 Views: 2,326 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 Views: 2,326 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 Views: 2,326 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 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 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 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 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 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 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 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 Views: 2,326 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 Views: 2,326 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 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: JavaScript / DHTML / AJAX Oct 2nd, 2008 |
| Replies: 3 Views: 954 made some adjustments, probably not what you want to do with it but got it working. the problem was that in the beginning of your javascript function you are changing the display properties of some... |
Forum: PHP Oct 1st, 2008 |
| Replies: 3 Views: 540 That should be fine, if it doesn't run check the file permissions. |
Forum: PHP Oct 1st, 2008 |
| Replies: 3 Views: 540 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 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,156 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,156 <?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,156 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,156 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 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 Views: 666 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 Views: 666 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: Geeks' Lounge Sep 11th, 2008 |
| Replies: 39 Views: 4,139 Yes, but being an open source project and with the resources that Google has, I'm sure it won't take long before it is. I think though that many people feel like I do in that there is no room for a... |
Forum: Geeks' Lounge Sep 6th, 2008 |
| Replies: 39 Views: 4,139 Actually, the way they have it set up is that each tab is like a separate process so if one tab freezes, the rest of the browser continues to work. It's a good idea, not quite enough to convince me,... |
Forum: Geeks' Lounge Sep 4th, 2008 |
| Replies: 39 Views: 4,139 They sneak up on you:
"oh that's cool"
and
"oooh let's try that".
"Google's doing this!" and "Google's doing that!" and pretend like they are not after the entire F'N market, and then one day... |
Forum: PHP Aug 29th, 2008 |
| Replies: 16 Views: 1,720 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: JavaScript / DHTML / AJAX Aug 22nd, 2008 |
| Replies: 6 Views: 1,019 Ensure that your function and variable names are unique. |
Forum: PHP Aug 21st, 2008 |
| Replies: 10 Views: 1,189 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,189 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: 860 replace:
echo $row_test;?>
with
echo $row_test['total'];?> |
Forum: PHP Aug 19th, 2008 |
| Replies: 4 Views: 1,120 Are you sure, did you put an alert() in the function to see? |