ober
-
Posts
5,327 -
Joined
-
Last visited
Posts posted by ober
-
-
Not off the top of my head. And I'd keep an eye on this thread if I were you. There are a few other members on here that probably have some experience in this arena that may be able to help you out.
-
You can jump in and out of PHP as much as you want.
-
I don't honestly know to tell you the truth, but I'm about 96% sure that calling a PHP script via webbrowser would pretty much kill it if you just decided not to provide a return path for the results.... that may not be an exactly accurate description of why it would die, but I can't come up with the right wording at the moment.
It can't hurt to try, but it appears that you've done that, without a positive result. -
Your function would have an input in the class:
[code]function GetUserInfo($user) { [/code]
And you would call it like this:
[code]$cn->GetUserInfo($user);[/code]
Alternately, you could also pass this as a value to the constructor and make it a global variable in the class if you plan to use it in other areas of the class. -
[code]echo '<script type="text/javascript">document.writeln(\'<img id="menu0Image" src="./images/minus.jpg" alt="Collapse" onClick="toggle(\'menu0Image\',\'menu0List\')\';\'">')\';\'</script><br>';[/code]
Give that a shot. You have to escape ALL single quotes.
And I'm not sure why you're using an echo for this... surely you could jump out of PHP and just write that instead of echoing it.
-
Chances are they're not using PHP to do that. They're firing off some system-based software that builds the report for you.
-
[code]
for($i=0;$i<count($myarray);$i++)
{
if(strlen($myarray[$i]) == 1)
$myarray[$i] = "0" . $myarray[$i];
}
[/code] -
Well you would just create a file and write out to it then... I'm not sure why you'd want to do that, but that's up to you.
-
Look to your right.
-
I think you're confused or I'm not catching on to what you're trying to do. I assume "getuserinfo()" is always going to have the same output.... so you would put the echos and whatnot in the class as well. Keep in mind that calls to functions in a class can work somewhat like a more powerful include().
When you call the $cn->GetUserInfo() and you have your while loop and echos in the class, it will display all that information for you. You don't have to return it or anything like that. -
That's correct in most cases, but why should your user have to hit the back button??? You should be doing that for them.
And at least for IE, you'll often get "Page Expired" errors when you try to go back to a form like that. -
You would generate the HTML the same as you would generate the page on your website, except that you put all the HTML code into a variable which gets passed on to the mail() call as the body.
-
That only works if that 2nd page is pre-defined... your solution fails if you plan to put this in place throughout a website.
-
The proper way to do it is to have your validation code on the same page as the form. When the user submits the form it refers back to the same page and if the form results are invalid, you show the form again and the values are already there in the POST/GET. But you do all the validation before any HTML so if the validation is correct, you send the user onto a "thank you" page with the header() call. You can do the mailing after the validation or on the thank you page, it doesn't matter which one.
-
So is the question answered?
-
There is no function in PHP that will allow you to go back twice. The only way to do that would be to store a history in a cookie or in a session and then pull that out and stick it in header(Location:...)
-
And that's exactly what you should be getting. All you've done is create the object and run the constructor.
You need to do something like this:
[code]$cn = new MySQLConnect();
$cn->GetUserInfo();[/code]
But that's not going to output anything either, because you don't actually spit out your results, unless you're not showing us everything. -
[code]$query = "SELECT * FROM sample";
$result = mysql_query($query) or die(mysql_error());
if($result && mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{
extract($row);
echo "$field_a<br />";
echo "$field_b<br />";
// etc
}
}[/code] -
Are the hits stored in the same table?
SELECT * FROM table XYZ order by hits -
Since you are using an array for the names, you can do something like this in your processing page:
[code]
foreach($_REQUEST['record'] as $key)
{
$query = "UPDATE table SET boolean_field = 1 WHERE ID = $key";
// run query and whatever else
}
[/code] -
Are you deleting the record or just removing it from the display? If you're deleting the record from the database, you don't need an extra field. If you're just removing it from the display, all you need is an enum field that can be either 1 or 0.
Keep in mind that when you submit a form with checkboxes, only the ones that are checked will be passed on. -
If you're using the default PHPBB registration process, you'll have to modify their code. Either that, or you could just as easily use the PHPBB users table as the same users table for the main page.
-
Well, I just noticed something else. He is sending an associative array to extract (that's what $row is), but there is a $ before the extract.
Remove the $. extract() is a function, not a variable. -
Welcome to the forums. Your question is not a result of PHP. Layout issues concern HTML or CSS. I will move this to the CSS board.
Post to two diferenet files
in PHP Coding Help
Posted