ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
Did you create the XML file?
Have you looked through the PHP manual on XML DOM?
Explain "Dynamic" in terms of how you mean it. Do you want a page that updates itself periodically if someone is watching it, or a page that reads from the file automatically? -
A quick look at your source reveals that you're not closing the quotation marks after the image path:
echo '<img src="images/' . $imgs[$row[3]] . '.png" ' . $attr . '></td>
That should work. -
Have them do it the first time (hell, store it as an input when they run your initial install script) and then just fill in the form for the update with the details. If the details change, just update the settings. That way, they only have to enter it once, but it gives them access to change it as needed.
-
AJAX is not new, and it's not a specific language. It is a combination of JavaScript and calls to backend scripts, whether it be Perl, PHP, ColdFusion, etc.
www.ajaxfreaks.com is another site that is part of the webfreaks network. Check it out. -
Tablenames cannot have spaces, unless I'm mistaken!
-
[code]if($Rank >= 1)[/code]
-
That will not work, redarrow.
-
SELECT COUNT(colname) AS cntCol FROM tablexyz WHERE cat = 'x';
-
That's because mysql_query is going to return the result set number.
You really need to stop nesting your functions so you can troubleshoot more easily:
[code]$query = "INSERT INTO `$compl` ( `Name` , `Sail Number` , `Class` , `Score` ) VALUES ( '$name', '$snum', '$boattype', '$score')";
$result = mysql_query($query) or die(mysql_error());
if($result && mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
}
[/code]
That's how it should be structured. Then you can echo the query quite easily. -
I'm not sure, to be completely honest. I've never used sockets.
-
If the values are truly numbers, change the datatype to int instead of varchar.
-
Post the code again with the changes and double check to make sure your tablenames and column names match what you actually have.
-
It's probably because: "SELCT * FROM `$compl` WHERE `Name`=$name"
1) you spelled "SELECT" wrong.
2) $name should be in quotes: "SELECT * FROM `$compl` WHERE `Name`= '$name'"
-
To use your current method, you would have to call $row = mysql_fetch_array($result) between every < td >. To do it correctly, you need to have a column count, and your containing row would be closed when your column count == 3. That way, you call your main chunk of code that holds the item only once within the loop.
I don't know if that makes sense, but it's hard for me to tell what it's currently doing. -
You cannot do that all in one query.
INSERT INTO table1 (col1, col2) VALUES (val1, val2)
run query
$new_id = mysql_insert_id($result);
INSERT INTO table2 (col1, col2) VALUES ($new_id, val2)
run query
-
If your host allows you to setup multiple FTP accounts, I don't see how having your "secondary" FTP account info on his server would be a problem. You could setup a subdomain on your hosting or a seperate area where the secondary FTP can only access that area.
I wouldn't keep his info on your site, but I'd have no problem keeping "update ftp info" on his site. -
It's called "looking up the date() function in the manual".
-
There are a few options to consider...
FTP, Sockets... Both would probably do what you want. -
[code]$sql2="SELECT * FROM clan_members WHERE Gamer_Tag='" . $_REQUEST['Gamer_Tag'] . "'"; [/code]
I should also add that $_REQUEST is the global array that holds the $_GET and $_POST data... $_GET would hold the data you're passing, $_POST would hold data posted from a form that uses the POST method.... just to give you a little background info. ;-) -
I'm not exactly sure what you're asking, as your english isn't that great, but if you want to get a formatted string from the database, you have to use the date() function with a time/date format:
[code]$login_time = date("n/j/Y h:i:s A", strtotime($row["login_time"])); [/code] -
Look, if your users like it, you're ok with it, and there are no functional problems, why listen to a bunch of web designers who may not have a clue about what makes a website look good?
It's all about your opinion. You can agree or disagree with us. You're never going to make everyone happy.
I'll email you a screenshot. -
I have to agree. It's pretty bad.
It's extremely dark, your contrast between your text color and the background isn't strong enough, you have no hover effects on the nav or elsewhere, and your "reds" don't even match across the site, unless my eyes are playing tricks on me.
I do like the logo, but the rest of the site needs a serious overhaul. -
Your || should be an &&.
Well let's just go full out and list both ;-)
[code]
$comment_lines = 0;
$code_lines = 0;
foreach (glob("*.php") as $filename) {
$thefile = file($filename);
foreach($thefile as $key => $val){
if(trim($val) != '' && substr(trim($val),0,2) != "//" && substr(trim($val),0,2) != "/*")
$code_lines++;
if(trim($val) != '' && (substr(trim($val),0,2) == "//" || substr(trim($val),0,2) == "/*"))
$comment_lines++;
}
}
echo "Lines of code: $code_lines<br/>";
echo "Lines of comments: $comment_lines<br/>";
[/code]
And we could get more tricky with it... look for lines that have series of "========", "---------", etc... and you could single out full comment blocks as well, looking for the beginning and ending /* */
Crazy. -
Use a semicolon after or it or the value instead of the name: & # 1 8 0 ; (without the spaces)
Variables in between files
in PHP Coding Help
Posted