trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
tidy. I wouldn't bother in production, though it can come in handy during dev.
-
You want us to do your homework?
-
$HTTP_POST_VARS has long been deprecated in favor of $_POST.
-
Funnilly enough, that's pretty much exactly what the error says.
-
Your topic within the Beta Test board was not approved because you quite obviously didn't read the sticky within that board. So, now, thanks for the double post.
-
Firstly, you would need to make $name a public property. Secondly, your f() method would need to return an instance of itself in order to be chainable. <?php class a { public $name; public function f() { $this->name = 'John'; return $this; } } $name = new a; echo $name->f()->name;
-
Yes phpmyadmin requires a http server (Apache is a http server) to run. If you installed phpmyadmin via your package manager it likely pulled in Apache as a dependency and set it up for you which is why you should remove the one you installed manually. As for the files within /var/www. These are not part of the server per say, but this is generally where people put there various websites document roots.
-
Never even noticed it. You best remove it, it does nothing and I would have thought would be giving you an error. The second arument to mysql_query is an optional connections resource. Optional meaning, not required. Whoever told you to put a 0 there was incorrect.
-
$result holds a database result resource so it will never be equal to $sent_email. Instead of.... if($result==$sent_email){ try.... if (mysql_num_rows($result)) {
-
This has what to do with Ajax? If you already have an echo statement echoing your form (its VERY unclear from your snippet) then its simply.... <input type='hidden' name='tbclient[total]' value='$total'> otherwise..... <input type='hidden' name='tbclient[total]' value='<?php echo $total; ?>'>
-
The form itself needs to be within a https domain I'm certain.
-
$_SERVER["SERVER_NAME"] returns some ip address
trq replied to programming.name's topic in PHP Coding Help
Its likely that the host is setup to use ip based virtual hosts instead of name based. Its an Apache config choice. -
how can i forward emails to PHP script on shared hosting account?
trq replied to hoolahoops's topic in Linux
If you had your own server (or even a vps) you would have more options such as incron which can execute scripts when changes are made to directories. But without more control of the server yuor pretty limited in what you can do. -
If your util.php file outputs anything before the <html> tag it will make your document invalid. So yes, it sounds like your documents are structured incorrectly.
-
Surely it is included into a process that does somewhere along the line include a html <head> tag?
-
You need to include your style sheet wherever your html <head> is defined.
-
And.... your question / problem is?
-
Take a look at mysql_num_rows.
-
Ive never been any good at typing. 61 - 57
-
The field xxx does not exist within your database. Read the error messages, its not rocket science.
-
Ha! A copy and paste err.
-
You'd best take another look at preg_match.
-
See where the Notice states 'No database slected'? That is your problem. In your previous code you have odd quotes around your database name.
-
You should always check your queries actually execute successfully and return results before trying to use them. $sql = "SELECT * FROM tblProperties WHERE xxx=xxx"; echo "Here are all the properties that match your search:<br>"; if ($result1 = mysql_query($sql, $conn)) { if (mysql_num_rows($result1)) { while ($array1 = mysql_fetch_array($result1)) { echo "<p>Property Name: " . $array1['PropertyName'] . "<br>"; echo "Location: " . $array1['Location'] . "</p>"; } } else { echo "No results found"; } } else { trigger_error(mysql_error() . "<br />" . $sql); } Now, what error are you getting? ?>