john010117
Members-
Posts
492 -
Joined
-
Last visited
Never
Everything posted by john010117
-
I don't believe there is such query for that.
-
First of all, did you set the directory (in which the file will be upload to) to 777? Second of all, did you get any PHP errors? Try putting this: error_reporting(E_ALL); at the very top of the PHP code.
-
First of all, don't expect us to make the code for you. Post that in the freelancer section if you do. Second of all, the code will undoubtedly involve cookies (more on that here). If you actually get started on your code, and you are still having trouble, then you can post your specific code for any recommendations. But read some tuts first.
-
[SOLVED] Can you please help me in uploading files from client browse
john010117 replied to oceans's topic in PHP Coding Help
1) Set the directory (to which the files will upload to) permissions to 777. 2) Replace your form to this: <form action="examplefileupload.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /><br /> <input type="submit" name="submit" value="Submit" /> </form> (you didn't put the end tag for the form). See if that helps. -
should i use a php include for my flash header?
john010117 replied to dan182skater's topic in PHP Coding Help
I detest iframes. It's not search-engine friendly. But in your case, iframes might be the solution. -
What exactly is the error message?
-
Go to the main website and read the tuts there. If you are new to PHP, I suggest you start out slow.
-
Instead of using links, make a simple form and pass the variables with the POST method instead. Ex: <form action="link.php" method="POST"> ...Form code goes here... </form>
-
Instead of putting nothing between the quotes, use the empty() function instead. Read more about it here.
-
Query not working, fatal error, undefined function
john010117 replied to StanLytle's topic in PHP Coding Help
I found one thing wrong with the code that you have now. if ($SessionUserID == $PhotoContribResult) { $PhotoContrib = 1; echo "User has photos posted."; } else { $PhotoContrib = 0; echo "User does not have photos posted."; } If you only put one equal sign on the first line, the code actually sets the variable to $PhotoContribResult. But since it's in an "if" statement, two equal signs means that the script will actually check if they are equal to each other. As for the session thing, read about it here. -
[SOLVED] Internet survey - filtering questions
john010117 replied to delirium's topic in PHP Coding Help
To clean the code up a bit... if($_POST['var']=="Something" { redirect("somewhere.php"); } else { header( 'Location: somewhere.php' ) ; } ?> Oh, and validate the $_POST info. -
[SOLVED] Registration/Adding members to database
john010117 replied to RitchieGunz's topic in PHP Coding Help
No prob. Please mark this thread solved by clicking "solved" at the bottom of the page. -
[SOLVED] Registration/Adding members to database
john010117 replied to RitchieGunz's topic in PHP Coding Help
//Insert new user $username = $_POST['username']; $email = $_POST['email']; $query = mysql_query("INSERT INTO `members` (username, password, email) VALUES ('$username', '$password', '$email')") or die(mysql_error()); //Close mysql mysql_close(); -
[SOLVED] Registration/Adding members to database
john010117 replied to RitchieGunz's topic in PHP Coding Help
Try putting a } at the end of the code. That solves most cases. -
Heh, I've already asked them about that, but they are too lazy. They still have PHP 4.x installed on their servers....
-
This doesn't belong here. Try here
-
[SOLVED] Registration/Adding members to database
john010117 replied to RitchieGunz's topic in PHP Coding Help
Replace that with this: $username = $_POST['username']; $email = $_POST['email']; $query = mysql_query ("INSERT INTO `users` (username, password, email) VALUES ('$username', '$password', '$email'") OR DIE (mysql_error()); It should work. -
[SOLVED] PHP SHOPPING CART giving unexpected $end error ???!!
john010117 replied to OilSheikh's topic in PHP Coding Help
Be patient. Show us your menu.php -
The only thing I can suggest in this very late hour is to put backticks around the table name when you're inserting the data. mysql_query("INSERT INTO `divers` (name, email, dive, lastd, hcert, snorkeling, passport, scubaran, scubaski, openwater, juniorow, advadven, advow, wreckd, deepd, navi, comput, nitrox, seandrec, strares, uwphoto, drysuit, boatd, fishid, hunter, bouyski, equitech, driftdiv, cavediv, divecon, asinst, instruc, advinst, divecin, scrains, iscert, advnitf, decopro, normtmx, adecpro, mord, aftd, fuldd, doutd, mdwkd, mrd, short, nidiv, helid, dextdv, rqbud, owneq, serveq, freq, eqneed, local, dclub, comm) VALUES ('$name', '$email', '$divet', '$lastd', '$hcert', '$snorkeling', '$passport', '$scubaran', '$scubaski', '$openwater', '$juniorow', '$advadven', '$advow', '$wreckd', '$deepd', '$navi', '$comput', '$nitrox', '$seandrec', '$strares', '$uwphoto', '$drysuit', '$boatd', '$fishid', '$hunter', '$bouyski', '$equitech', '$driftdiv', '$cavediv', '$divecon', '$asinst', '$instruc', '$advinst', '$divecin', '$scrains', '$iscert', '$advnitf', '$decopro', '$normtmx', '$adecpro', '$mord', '$aftd', '$fuldd', '$doutd', '$mdwkd', '$mrd', '$short', '$nidiv', '$helid', '$dextdv', '$rqbud', '$owneq', '$serveq', '$freq', '$eqneed', '$local', '$dclub', '$comm')")or die(mysql_error()); Also, you don't have to end "?>" right before the query. So, after the variables list, it goes straight into the mysql_query. Hope that helps.
-
It will need your database settings, as well as the connect code. <?php // Connect to the database $host = "DB_HOST"; // db host $user = "DB_USERNAME"; // db username $pass = "DB_PASSWORD"; // db password $db = "DB_NAME"; // db name $connection = mysql_connect ($host, $user, $pass) or die ("Unable to connect"); mysql_select_db ($db) or die ("Unable to select database"); ?> Make sure to replace the capitalized letters with your correct settings.
-
[SOLVED] Registration/Adding members to database
john010117 replied to RitchieGunz's topic in PHP Coding Help
Try doing this: <?php echo '<form action="check.php" method="post">'; -
Make sure you've put: include ("settings.php"); (replacing settings.php with the file to connect to the database) BEFORE any queries.