Zhadus
-
Posts
376 -
Joined
-
Last visited
Never
Posts posted by Zhadus
-
-
It is the input field, it's not actually a PHP related question - it's straight HTML.
Don't you just LOVE HTML?
By the way, here is a quick fix, use the HTML code for the double quotation:
$var = "The length is 5' x 2" and blah blah";
It will output correctly for you and show up right, just a pain to work with.
EDIT:
" might work in place of " and a bit easier to use.
-
<?php if (isset($fetched['agent_email'])) { echo "<br /><a href='mailto:".$fetched['agent_email'] . "'>". $fetched['agent_email'] . "</a>"; } else { echo "No values in variable."; } ?>
-
I say write one from scratch, they aren't extremely difficult to code correctly, and then you can add the features that you want. Avoid the cookie-cutter designs as much as possible and have something that again is just "yours."
Anything I've personally incorporated into a site from a pre-made system has been more hassle than it's worth and I usually end up recoding half of it anyway, but I have not had personal experience with pre-made comment systems.
-
$end error means you have a bracket that's left open.
The { bracket at the beginning after you use <?php is not needed and is causing the problem from what I can tell, although I'm not sure what the whole switch() thing is about.
-
You can use some javascript and when a link is clicked make it disappear until the page is loaded again. Or if you are using buttons you can disable them. Then they couldn't click on it again until the page is reloaded.
This would work, but when working with people who have fun exploiting your games, they can and will disable javascript or bypass it completely with their own javascript scripts.
-
It's caused because you're doing the check to see if a creature attacks after the player has a chance to move. If they continually click the move links, the page doesn't have enough time to load the creature encounter. You can have the movement links go through a different page, checking for a creature attack, and then redirecting to the movement page instead, then it wouldn't matter how fast they click it.
-
Before your for loop of the records:
for($i=0; $i<$number_to_display; $i++) {
You can add this bit of code:
$number_to_display = ($number_to_display > $total_files) ? $total_files : $number_to_display;
That way if the number to display (In this case 9) is greater than the total number of files, the number to display is changed to the actual number of files.
-
I think I understand what you're trying to do there, you can try:
$stringlevel = $string . 'level'; $result = mysql_query("SELECT * FROM table") or die(mysql_error()); while($row = mysql_fetch_array( $result )) { //How do I use a string in here? echo $row['$stringlevel']; }
Then if $string is blue, it would be:
echo $row['bluelevel'];
-
You got it, the 2nd is probably more of what you're looking for. Although from what I see, you could probably avoid most of the work.
You already know what $cust_id is according to the query, I don't see why you'd need to draw the same data from the DB when it's the same info you passed into the query.
-
Well you have this:
$row = odbc_fetch_array( $rs );
followed by
while ( $row = odbc_fetch_array( $rs ) )
Which would eliminate the first record. Unless you're refering to the first record of transaction, which would really be the 2nd record.
-
Have you made sure that $checklist is getting the correct values before passing it onto the image file?
-
Is it missing the first one or last one?
-
You wouldn't be able to really force it to happen. You could include a link that the person could click on once they opened the email, otherwise maybe javascript would be a decent route to go.
-
You can replace it with the actual domain that another user is recommending if you know the domain. Otherwise if you're storing the information in a database, you can draw the information in using a query to get the domain.
-
The current date is LATER, and therefore a HIGHER number than the renew date. Therefore you'd want it LESS THAN the current date by an interval of 2 weeks. Hope that makes sense.
-
That's probably the best route, some trial and error. It's actually very simple once you know the process and I'm sure you'll take off from there. If you have any other issues or specific questions, feel free to post or contact me directly and I'll do what I can.
-
process.php will contain variables that draw the posted variables, e.g.:
<?php $firstname = $_POST['firstname']; $email = $_POST['email']; $location = $_POST['location']; $id = $_POST['id']; ?>
And after getting the variables like that, you use the variables ($firstname, $email, etc.) to update using the code you posted for MySQL. For instance, if you were going to just update a location:
mysql_select_db("roberts_work", $connect); mysql_query("UPDATE tblbasicform SET location = '" . $location . "' WHERE name = '". $firstname . "' AND email = '" . $email . "'"); mysql_close($connect);
Understand it now?
-
I see where you're having the issue. Okay then what you need is this tutorial:
http://www.tizag.com/phpT/forms.php
Basically you do a standard HTML form with the target into a PHP page. That PHP page loads the variables that you "POSTED" with the form, and then you use PHP to update the MySQL.
-
This site is awesome. If you've already got a database set up. Items 4 and 7 should be what you need.
-
I would think 3rd party applications would be the best place to ask questions about that. Otherwise they should have their own site with implementation instructions/tutorials.
-
If you're talking about dynamically filling in the fields once the user is selected in a drop down box, it will need to be javascript. If you'll "submit" the information and load up a new page, PHP will do just fine. If you can answer that I should be able to direct you to the correct place/tutorial.
-
Learn the awesome use of loops. And arrays are more friendly than you think.
<?php function getNum($min, $max) { $num = rand($min, $max); return $num; } for ($x = 0; $x < 6; $x++) { $b[] = getNum(1, 49); } for ($x = 1; $x < 6; $x++) { while ($b[$x] == $b[($x-1)]) { $b[$x] = getNum(1, 49); } } sort($b); $output = implode(", ", $b); echo $output; ?>
Ack, beat me to it. Same idea, just a little different route.
-
What format is the date in, the automatic MySQL datestamp?
-
I apologize for all the long delays, trying to help you out while at work here
I'm still having some difficulty with what you're incorporating this system into. It seems to me like you're not grasping the full concept of what functions are capable of and what is required of them. In order to maintain the same action, you'll have to pass it into the address bar. If it is possible it will have different actions, you'll need to pass the current action INTO the function. Therefore instead of what I had stated with:
$prev = " <a href=\"$self?action=allsalestoday&page=$page&$strGet/\">[Prev]</a> ";
You would want the function to be like this:
$action = $_GET['action']; function allsales_Today($action) { // etc.
and the link would be:
$prev = " <a href=\"$self?action=$action&page=$page&$strGet/\">[Prev]</a> ";
I hope my understanding was clear enough.
[SOLVED] having issues sorting numbers with sort()
in PHP Coding Help
Posted
That's not technically sorting "numbers" there are commas. If you strip the numbers of those, it should sort properly.