
mhallmon
Members-
Posts
18 -
Joined
-
Last visited
Never
Everything posted by mhallmon
-
I'm not 100% sure but I'm guessing the people at Boeing would probably start by telling you to go after a bachelor degree in aerospace engineering or something along them lines. Maybe even tell you to attend a few aviation classes at Bismarck's Career Academy since there they have kids building planes. But... I'd almost promise you they would just tell you to forget about it... it's too hard. Obviously, I posted looking for help on a "HELP" forum for "LEARNING" how to do it because I already knew it was more than I was capable of doing at the moment. Hence... the reason I wanted to "LEARN" how to do it. If for some reason I thought I was capable of doing it off the knowledge I have now... I wouldn't be here asking for someone to point me in the right direction.
-
Which is the reason I came to a help forum. To find out where I could learn to do it or have someone guide me along the right path who has done it before. But, so far, all I have learned there really isn't many people that help here with anything beyond the basics. Simply saying that would be to hard for you is exactly the opposite of the intended purpose of this forum. You should be giving advise on how they can LEARN to do what they are asking about. About 2 months ago I had no knowledge of php or even MySql. I have taught myself a lot over this time and for some dumb reason have came here several times looking for advise but have receive pretty much the same response. "That's too advanced" ... yet I have managed to do it without any help only taking a lot longer than if I had had advise on my topics. If your not going to offer real advise on the topic that someone is posting about... then why even post a comment?
-
How to store checkbox answers from html form into mysql?
mhallmon replied to skidmark10's topic in PHP Coding Help
This isn't the only way... just an easy way. With [] I've always ran into nothing but issues. Shouldnt take long to add 3 fields to your db and change your code a little. You would be removing more code than adding. -
How to store checkbox answers from html form into mysql?
mhallmon replied to skidmark10's topic in PHP Coding Help
You could assign an individual name to each value... make sure to update your database table as well: <td><div align="left">Please select all body types you would be interested in dating: </div></td> <td><input name="partnerbodytype1" type="checkbox" value="Slender" /> Slenders <input name="partnerbodytype2" type="checkbox" value="Average" /> Average<br /> <input name="partnerbodytype3" type="checkbox" value="Athletic" /> Athletic <input name="partnerbodytype4" type="checkbox" value="Heavy" /> Heavy<br /> php: $partnersbodytype1 = $_POST['partnersbodytype1'] $partnersbodytype2 = $_POST['partnersbodytype2'] $partnersbodytype3 = $_POST['partnersbodytype3'] $partnersbodytype4 = $_POST['partnersbodytype4'] $sqlClientInfo= "INSERT INTO `Client_Info` (partnersbodytype1, partnersbodytype2, partnersbodytype3, partnersbodytype4) VALUES ('$partnersbodytype1','$partnersbodytype2','$partnersbodytype3','$partnersbodytype4') -
I'm using PHP to integrate my PayPal Website Payments Pro onto my signup page.... or at least thats what I thought I was going to do. PHP version: 5.2.11 Plesk platform I want to do the custom integration rather than shopping cart for sales not authorization If anyone can offer some advice, knowledge or link some tutorials or forums that explain in great detail about integrating PayPal's Website Payments Pro I would much appreciate it. I have been sorting through the paypal forums... and the guides as well as searching online for something more detailed and step-by-step than what is offered. I am obviously still new to php and never integrated something like this. I would post the codes but it's kind of pointless when all I have is the downloaded "generated codes" from paypal with no idea of where to place them or how to use them. I'm sort of feeling like a dog that caught the car... what the hell do I do with it?
-
How to store checkbox answers from html form into mysql?
mhallmon replied to skidmark10's topic in PHP Coding Help
You should post your code so that people can see what your working with -
Okay. So this is what I came up with... I used pagenation. It all looks a little generic but I guess I can tweek it later. My issue now is that I can't get the pic to show up... it just shows as a broken image: <?php //Include the PS_Pagination class include('ps_pagination.php'); //Connect to mysql db $conn = mysql_connect("localhost", "******", "*******"); mysql_select_db('membership',$conn); $sql = "SELECT * FROM members";// WHERE niche = '{$_GET['niche']}'"; //Create a PS_Pagination object $pager = new PS_Pagination($conn,$sql,10,20); //The paginate() function returns a mysql //result set for the current page $rs = $pager->paginate(); //Loop through the result set while($row = mysql_fetch_assoc($rs)) { // $a=0; // while ($a < $num) { // $id=mysql_result($result,$a,"id"); // $title=mysql_result($result,$a,"title"); // $strategies=mysql_result($result,$a,"strategies"); // $client=mysql_result($result,$a,"client"); // $copy=mysql_result($result,$a,"copy"); // $thumbmedia=mysql_result($result,$a,"thumbmedia"); // $niche=mysql_result($result,$a,"niche"); $id=$row['id']; $firstname=$row['firstname']; $lastname=$row['lastname']; $sex=$row['sex']; $age=$row['age']; $height=$row['height']; $weight=$row['weight']; $state=$row['state']; $files = "memberFiles/$id/pic1.jpg"; echo "<table border='2'> <tr> <th>Image</th> <th>Firstname</th> <th>Lastname</th> <th>Sex</th> <th>Age</th> <th>Weight</th> <th>Height</th> <th>Location</th> </tr>"; { echo "<tr>"; echo '<div class="column3"><img src="memberFiles/"$id"/pic1.jpg" alt="Ad" width="100%" /></div></div>'; echo "<td>".$files."</td>"; echo "<td>" . $row['firstname'] . "</td>"; echo "<td>" . $row['lastname'] . "</td>"; echo "<td>" . $row['sex'] . "</td>"; echo "<td>" . $row['age'] . "</td>"; echo "<td>" . $row['weight'] . "</td>"; echo "<td>" . $row['height'] . "</td>"; echo "<td>" . $row['state'] . "</td>"; echo "</tr>"; } echo "</table>"; // $a++; // } } //Display the navigation echo $pager->renderNav(); ?> Why wont this show the image? echo '<div class="column3"><img src="memberFiles/"$id"/pic1.jpg" alt="Ad" width="100%" /></div></div>';
-
I have been using the code posted prior by creating another page and just linking it... but that's kind of annoying and the members can only search by my criteria. My basic code is below as you can see none of it is linked and I can't figure out how to make each one a link to the members profile: <?php include_once "connect_to_mysql.php"; mysql_select_db("membership", $con); $result = mysql_query("SELECT * FROM members"); echo "<table border='2'> <tr> <th>Firstname</th> <th>Lastname</th> <th>Sex</th> <th>Age</th> <th>Weight</th> <th>Height</th> <th>Location</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['firstname'] . "</td>"; echo "<td>" . $row['lastname'] . "</td>"; echo "<td>" . $row['sex'] . "</td>"; echo "<td>" . $row['age'] . "</td>"; echo "<td>" . $row['weight'] . "</td>"; echo "<td>" . $row['height'] . "</td>"; echo "<td>" . $row['state'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>
-
I understand that something like this would be complex for me being that I am new to both PHP and MySql. That's the reason I came here for advise. I have found, watched and read tutorials on how to optimize my database. This all just started as a hobby for learning experience but turned into an overnight blowup. That's why I am asking for advise on how to go about implementing the search aspects. Any suggestions on tutorials, videos or straight out advice would be nice.
-
I didn't include the code earlier... maybe I should have. This is what I have: <?php include_once "connect_to_mysql.php"; mysql_select_db("membership", $con); $result = mysql_query("SELECT * FROM members WHERE sex='male'"); while($row = mysql_fetch_array($result)) { echo $row['firstname'] . " " . $row['lastname']; echo "<br />"; } ?> The code works perfect but I need it to do more than just return the information. I need this to be searchable using check- boxes and drop downs.
-
What I was asking for was someone to point me in the right direction. I bought the PHP and MySql Bible from Wiley books... a great $50 investment and it's helped me with my site so far. I have watched most of the tutorials offered by Adam from web intersect... I've searched the net for tutorials but have not came up with anything to help me. Like I said... I am new to PHP and MySql. I've tried to google but no matter how I word it... the results are never what I am looking for or they don't work. I'm not looking for someone to do it for me... just point me in the direction I need to be in. I want to learn how to do it... that way in the future I wont have issues with it.
-
Hello! I'm trying to create a page on my site that will allow paid members to search for other members using check boxes and multi-select drop down boxes to select what type of members to display. For instance; male or female. I dont know where to start. I am new to mysql and kinda new to php as well. I use "connect_to_mysql.php" to connect to the database. The database name is "members". I would like to include "sex", "age", "ethnicity","weight" , and "state". After the paid member selects the fields they are looking for and hits submit... I need it to take them to a page that displays a link (their name and picture) to the profiles of all the members that meet their reqs . How would I go about making this page and making it work? I have searched the internet for tutorials and have came up with nothing that helps... or at least that I can understand. I am sort of running on a short time line and really need some major help. Please help me.
-
Uploading multiple images; assigning a random number to file
mhallmon replied to mhallmon's topic in PHP Coding Help
I found a better tutorial and tried the script... it worked. I will post it in a min just in-case anyone else ever has this issue -
Uploading multiple images; assigning a random number to file
mhallmon replied to mhallmon's topic in PHP Coding Help
Thanks for the fast reply and also, thanks for the info on W3school... After searching the net for hours... they were the only source I found that had information I was looking for without downloading software to do it for me. I would rather know how to do it. The error message I continue to get is : "There was an error uploading the file, please try again. If it continues to happen please contact support." Not sure why. -
I am new to coding so please bare with me. I originally had my members edit_pic page to only upload one pic and overwrite the old pic if uploading a new one. I want my members to be able to upload multiple pics and have them saved to the membersFile/"Thier ID"/ directory on my server. After reading the tutorial from w3schools I decided to copy and paste their code, then change what needed to be changed. Here is the code: <?php session_start(); if (!isset($_SESSION['id'])) { echo 'Please <a href="login.php">log in</a> to access your account'; exit(); } $id = $_SESSION['id']; // Process the form if it is submitted if ($_FILES['uploadedfile']['tmp_name'] != "") { // Run error handling on the file // Set Max file size limit to 3mb $maxfilesize = 25165824; // Check file size, if too large exit and tell them why if($_FILES['uploadedfile']['size'] > $maxfilesize ) { echo "<br /><br />Your image was too large. Must be 3mb or less, please<br /><br /> <a href=\"edit_pic.php\">click here</a> to try again"; unlink($_FILES['uploadedfile']['tmp_name']); exit(); // Check file extension to see if it is .jpg or .gif, if not exit and tell them why } else if (!preg_match("/\.(gif|jpg)$/i", $_FILES['uploadedfile']['name'] ) ) { echo "<br /><br />Your image was not .gif or .jpg and it must be one of those two formats, please<br /> <a href=\"edit_pic.php\">click here</a> to try again"; unlink($_FILES['uploadedfile']['tmp_name']); exit(); // If no errors on the file process it and upload to server } else { // Rename the pic function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } //This applies the function to our file $ext = findexts ($_FILES['uploaded']['name']) ; $ran = rand () ; $ran2 = $ran."."; $target = "memberFiles/$id/"; $target = $target . $ran2.$ext; // Set the direntory for where to upload it, use the member id to hit their folder // Upload the file if (move_uploaded_file($_FILES['uploadedfile']['tmp_name']['tmp_name'], $target)) { echo "Success, the image has been uploaded and will display to visitors!<br /><br /> <a href=\"member_account.php\">Click here</a> to return to your profile edit area"; exit(); } else { echo "There was an error uploading the file, please try again. If it continues to happen please contact support. <br /><br /> <a href=\"member_account.php\">Click here</a> to return to your profile edit area"; exit(); } } // close else after file error checks } // close if post the form ?> Now, when I test this page it will always echo the error. Can anyone please tell me what I did wrong and help me fix it?