pocobueno1388
Members-
Posts
3,369 -
Joined
-
Last visited
Never
Everything posted by pocobueno1388
-
[SOLVED] Save Date to table field date type
pocobueno1388 replied to jimlawrnc's topic in PHP Coding Help
"0000-00-00" is the best format, but you can do it how you want. To format the date how you are wanting, you would do this $date = date("Y/m/d"); Now if you inserted $date into a DATE field in the database, I'm pretty sure it will come out the format you set it in. -
An ambulance for that?! I was bucked off a horse and snapped both bones in my forearm and didn't even get an ambulance. My dad got a piece of wood and taped it to my arm and I had to carry it all the way to the hospital.
-
<?php if (isset($_POST['submit'])){ foreach ($_POST['delete'] as $id){ $query = "DELETE FROM person WHERE personID='$id'"; $result = mysql_query($query)or die(mysql_error()); } echo "Records Deleted<p>"; } $result = mysql_query("SELECT * FROM person"); echo "<form action='{$_SERVER['PHP_SELF']}' method='post'>"; while($row = mysql_fetch_array($result)){ echo "<input type='submit' name='delete[]' value='{$row['personID']}'> "; echo $row['FirstName'] . " " . $row['LastName']; echo "<br />"; } echo '<input type="submit" name="submit" value="Delete Records">'; echo '</form>'; ?> Wherever you see the row "personID" is where you need to replace that with whatever your unique ID is for that table.
-
You include the file at the top of your script that your using the class in. include "myclass.class.php";
-
Barand, just to let you know, there has been multiple double posts today. Someone earlier said they got an error and it posted the topic twice, so I don't think the posters are intentionally doing it.
-
Initializing your variables first will also speed up your script a little.
-
Post your code
-
Why did you post this twice? I replied on your last thread.
-
You can select a random row in your query, so that will make it easier <?php $query = "SELECT username FROM lottery ORDER BY rand() LIMIT 1"; $result = mysql_query($query)or die(mysql_error()); $row = mysql_fetch_assoc($result); mysql_query("UPDATE players SET credits=credits+$prize WHERE user='{$row['username']}'"); ?>
-
I used to be into online simulation games, and I would always be so curious on how every little thing worked. I finally got so curious that I started researching, and thats when I found PHP. Just from doing something very basic, yet dynamic, I would be completely amazed and got even more curious on how to do other things. So from that point on I was obsessive with it, I would always have a book or be reading online tutorials. I remember first coming to this forum and looking at the code some of you guys posted, and I was like "WTF! How do any of these people understand this stuff?!"...it literally looked like a bunch of jumbled letter and numbers that made no sense, hah.
-
The header banner doesn't look very professional, looks like it was just slapped together quickly. The links are very small and don't really stand out much. Basically the site looks pretty bland, there is a lot more creativity that can go into it.
-
This has nothing to do with PHP. The rollover would be javascript, and how to make an image would be photoshop related.
-
And where exactly are the tracks?
-
Well, if that is the tracks name, then what do you expect it to do? Obviously it is going to order by the name, and not the track. Could you post your database table setup?
-
That code doesn't make any sense. I'm not even sure what your trying to do. If the URL looks like this on the page you are on http:www.mysite.com/index.php?address=test%40testtt%2Ecom Then when you do this it will grab that information from the URL. $address = $_GET['address']; echo $address; //will print "test testtt Ecom" Now explain exactly what your trying to do. Your being to vague in your question to give you a better answer.
-
You can get the address by doing this $address = $_GET['address']; As long as your URL contains that information, it will be able to be grabbed by the above code.
-
Well, you are ordering by "productCode"...does that have something to do with the tracks? It's hard to help you without knowing the setup of your database.
-
http://www.phpfreaks.com/forums/index.php/topic,95867.0.html
-
[SOLVED] Echoing a variable before its declaration.
pocobueno1388 replied to play_'s topic in PHP Coding Help
I think the best solution is going to be a cookie. You don't have to include anything on every page and what not. -
All you have to do is this <?php if (!isset($_POST['field_name']) || $_POST['field_name'] == ""){ die("This field is required!"); } ?>
-
Thanks for your input...but this thread is 2 months old, and has been solved. No need to bring it back from the dead =]
-
[SOLVED] Rating System That Posts To a Dynamic Page..
pocobueno1388 replied to Deanznet's topic in PHP Coding Help
So you want to keep the URL? echo '<form method="post" action="'.$_SERVER["REQUEST_URI"].'">';