Jump to content

crazy8

Members
  • Posts

    72
  • Joined

  • Last visited

    Never

Everything posted by crazy8

  1. Well I thought maybe this would work but its not quite yet. So what I need to do is in drop down 1, if I select "youth" I need all of the names to populate into the second drop down. I know Im missing something and not quite sure where to go from here. Any help would be greatly appreciated. Here is what I have as of now... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>FBCSF SMS Message Form</title> <link href="../files/css/register.css" rel="stylesheet" type="text/css" /> </head> <? include('../files/class/ajaxRegistrationModule.class.php'); ?> <body> <div id="container"> <form action="" method="post" class="ajax_form"> <h2>SMS Form</h2> <h3>Send An SMS Message</h3> <ul> <li class="label"> Group: </li> <li class="field"> <select id="group" name="group" class="validate_blank combo"> <option value="0">Select:</option> <option value="Youth">Youth</option> <option value="Youth Parent">Youth Parent</option> <option value="Deacon">Deacon</option> </select> </li> <li class="label"> Who: </li> <li class="field"> <select id="name" name="who" class="validate_blank combo"> <option value="All">All:</option> <?PHP if ( $group == "youth" ) { echo $query = "SELECT * from ajax_form WHERE group= 'youth' "; echo $result = mysql_query($query) OR DIE ("There was an error" .mysql_error()); while ($line = mysql_fetch_array($lw1_query,MYSQL_ASSOC)){ echo $id = $line['id']; echo $fname = $line['fname']; echo '<option value="$id">$fname</option>\n'; } } if ( $group == "youth parent" ) { echo $query = "SELECT * from ajax_form WHERE group= 'youth parent' "; echo $result = mysql_query($query) OR DIE ("There was an error" .mysql_error()); while ($line = mysql_fetch_array($lw1_query,MYSQL_ASSOC)){ echo $id = $line['id']; echo $fname = $line['fname']; echo '<option value="$id">$fname</option>\n'; } } if ( $group == "deacon" ) { echo $query = "SELECT * from ajax_form WHERE group= 'deacon' "; echo $result = mysql_query($query) OR DIE ("There was an error" .mysql_error()); while ($line = mysql_fetch_array($lw1_query,MYSQL_ASSOC)){ echo $id = $line['id']; echo $fname = $line['fname']; echo '<option value="$id">$fname</option>\n'; } } ?> </select> </li> <li class="label"> Message:</li> <li class="field"> <textarea name="mesg" maxlength="160" height="40" size="40" type="text" class="validate_blank text"/></textarea> </li> </ul> </form> </div> <!-- container end --> <div class="footer"> <p>Powered by: First Baptist Church of St. Francis</p> </div> </body> </html>
  2. Well right now I have just the form itself so I don't have any PHP for that form. Figured I should find out and research what I could before getting to deep in. I know how to connect to a DB using PHP but dont know how to do the other stuff I asked about.
  3. Ok so I have a form that I am trying to get figured out with connecting to the DB and send mail to users based on a drop down "group" selection. Then once I select the group I am trying to figure out how to populate the "who" drop down which will contain an "all" option along with the names of all the people in the selected group. Once the group is selected and the person, or "all", then I need the form to send the email to all the email addresses associated with the selected group and users. This is my form so far. I know its not much yet but what I am looking to do, I have never done before. I have done a lot of googling and can not find quite what I am looking for. Any help would be appreciated. <div id="container"> <form action="" method="post" class="ajax_form"> <h2>SMS Form</h2> <h3>Send An SMS Message</h3> <ul> <li class="label"> Group: </li> <li class="field"> <select name="group" class="validate_blank combo"> <option value="0">Select:</option> <option value="Youth">Youth</option> <option value="Youth Parent">Youth Parent</option> <option value="Deacon">Deacon</option> </select> </li> <li class="label"> Who: </li> <li class="field"> <select name="who" class="validate_blank combo"> <option value="All">All:</option> </select> </li> <li class="label"> Message:</li> <li class="field"> <textarea name="mesg" maxlength="160" height="40" size="40" type="text" class="validate_blank text"/></textarea> </li> </ul> </form> </div>
  4. Well im no pro at PHP but I can stumble a long a bit. Based on my research I was under the impression that I could just set up an email account on the server that will host the php files and then use that email address to send out sms messages to who I desire without much or any more than that. As for spamming the form and using HTTPS couldn't I use captcha to cut on potential spam? So is this idea/project pretty much just going to be an idea unless a good amount of money is invested in it?
  5. Well maybe I should go into more detail of the project. Probably should have done that from the start...lol This is an idea I had which initially started at a meeting we had and one of the issues to address was "We give kids information for upcoming events and youth activity days, but rarely that info gets to the parents." Well of course all the kids have cell phones and most adults do to so it hit me that with all the texting everyone does maybe we can harness the technology. So the original idea was that I could create something that would send a txt message out to the youth group and their parents so they BOTH would have the info. But then we started thinking of other things like daily Bible verses and stuff. Being a church, despite their good finances, would like to do it cheap/free. Well I recalled that I can go to my email account and send a message to (for example) 6125551234@tmob.net and the person who belongs to that phone number would get the message as an SMS txt message on their phone. Well it really costs nothing to do this so the BIG picture here is this. People from the church will fill a small form online with their name, email, phone number, provider, and what "group" the belong to. If they dont have a cell phone then thats where the email comes in. All the data gets saved into the database including a column which will combine the phone number and the service provider gateway address such as verison which uses "@vtext.com". Then there is a form that I use to send the messages. It will consist of a "subject" text area, "message" text area only 160 characters, a drop down that has the "groups" in it and then the dynamic drop down which populates based on the other drop down selection but will also have an "ALL" choice since I will mostly be sending to "ALL" people in the selected group from the first drop down. I think I would do an op/out option on a third form which would just require first name, last name, and phone number or email address depending which one was used to sign up. Does this help clear it up at all? lol
  6. Holy smoke, it has been a looooooong time since I have been here. Love the new look of the site btw. Well I am working on a new project for my church. The idea is an email to SMS program. So one use of this would be that if there is a youth activity I could send a message to the entire youth group with one message. I am trying to figure out something specific with it. I need to create a form that grabs info from the database. So more specifically what I need is one drop down that will have "Youth Group", "Parents", "Deacons", etc. now based on what I select I need the second drop down to populate with the corresponding people in that group. Now I want an "All" to be in the drop down to which would let me send the message I type to ALL people in the desired group but to also have the individual names come up just in case I need to do a specific person. How would I go about doing something like this? I have done much research and cant quite find what I would need to do. Any help would be GREATLY appreciated.
  7. Am I understanding your recommendation correctly?
  8. Any ideas, tutorials, or examples on how to do this? Thanks again
  9. I have a small project im working on. I have a script that works as is right now but I have one more thing I would like to do. First off I will say this script is a combination of two other scripts I used in the past. This will be used in an administration area (for me only) so the security behind this isnt a big deal. So here we go. I have two input boxes as you can see, and I want to be able to type a directory (i.e /southdakota and /southdakota_thumbs) and if they dont exist, create them and if it does then upload images that I select and put them into that directory and the thumbs that get created to be put in the directory I have specified. I have looked up and down google and just can not find what I need to do this. So any help on how to do this would be greatly appreciated. <style type="text/css"> fieldset { background:#fff; width: 655px; } #message { font-size: .95 em; color: #b80101; font-style: italic; font-weight: bold; } #delete { clear: both; width: 500px; } .menu { float:left; } </style> <?php include_once ('db_connect_images.php'); ?> <?php //This page allows users to upload files tot he server //Set the page title and include the header $page_title = 'Upload an Image'; //include ('db_scripts/db_connect_insert_2.php'); //$db->connect('images'); if (isset($_POST['action'])) { $imageDir = 'image/'; //// root directory to main images folder with trailing slash $imageName = $imageDir . $_FILES['image_file']['name']; //// if (move_uploaded_file($_FILES['image_file']['tmp_name'], $imageName)) { $array = explode(".", $_FILES['image_file']['name']); $nr = count($array); $ext = '.' . $array[$nr-1]; ///// Insert data into the DB $insert = "INSERT INTO images (dir, ext, comment, date_added) VALUES ('" . $imageDir . "', '" . $ext . "', '$_POST[comment]', NOW())"; $insertresults = mysql_query($insert) or die(mysql_error()); $lastpicid = mysql_insert_id(); $newfilename = $lastpicid . $ext; rename($imageName, $imageDir . $newfilename); include_once('class.thumbnail.php'); ////// TAKE THE ORIGINAL IMAGE AND RESIZE IT TO A SLIGHTLY SMALLER ONE //// go and get the uploaded image $large = new Thumbnail('image/' . $newfilename . ''); //// and resize it to dimensions equal to or smaller than 800x600 $large->resize(800,600); //// now save it $large->save('image/' . $newfilename . '',150); //$large->destruct(); //only needed for PHP4 ////// NOW TAKE THE NEWLY RESIZED IMAGE AND CREATE A THUMBNAIL FROM IT // go and get the resized image $thumb = new Thumbnail('image/' . $newfilename . ''); // resize it to no larger than 200x200 $thumb->resize(150,150); // now to create thumbnails all the same size, create a 120x120 image, starting from the center //$thumb->cropFromCenter(200); $thumb->createReflection(0,0,0,true,'#ffffff'); /// save the resized/cropped image to the thumbnails folder $thumb->save('imagethumbs/' . $newfilename . '',150); //$thumb->destruct(); //only needed for PHP4 if ($insertresults) { $message = 'Image Added'; } else { $message = 'Image Failed'; } } else { $message = 'Image Failed to Upload'; } } if (isset($_POST['delete'])) { foreach ($_POST as $id => $value) { if (is_numeric($id) && $value == 'delete') { $sql = mysql_query("SELECT * FROM images WHERE id = '". $id ."'"); $rows = mysql_fetch_array($sql); $query = "DELETE from images WHERE id = '" . $id . "'"; $result = mysql_query($query); $largeimg = unlink('image/' . $id . $rows['ext'] . ''); $thumbimg = unlink('imagethumbs/' . $id . $rows['ext'] . ''); } } } ?> <?php echo '<div class = "nround" align="center">'; echo '<div class = "ntop"><h2>Upload Images</h2></div>'; echo '<div class = "nmiddle" align="center">'; echo '<fieldset class="display" align="center">'; echo '<div class="display" align="center" >'; $sql = "SELECT * FROM images ORDER BY id ASC"; $query = mysql_query($sql); $count = mysql_num_rows($query); if ($count == 0) { echo 'You have not uploaded any pictures yet!'; } else { echo ' <form action="" method="POST">'; while ($rows = mysql_fetch_array($query)) { echo'<div style="border: 2px solid #fff; margin: 5px; float: left;"> <div> <a href="images/' . $rows['id'] . $rows['ext'] . '" rel="lightbox"><img src="imagethumbs/' . $rows['id'] . $rows['ext'] . '"/></a> </div> <div> <input type="hidden" name="image_name" value="' . $rows['image_name'] . '"> <input type="checkbox" name="' . $rows['id'] . '" value="delete"> </div> </div>'; } echo '<div id="delete"><input type="submit" name="delete" value="Delete Images"> </div> </form>'; } echo '</div>'; echo '</fieldset>'; ?> <div align="center"><h2><font color="#b80101">Upload Images</font></h2></div> <form method="POST" enctype="multipart/form-data" name="image_upload_form" action=""> <fieldset> <div align="left"> <p>Image Folders Location <input type="text" size="32" name="folder" value="" /></p> <p>Thumbnail Folder Location <input type="text" size="32" name="thumbfolder" value="" /></p> </div> <div align="left"> <p>Upload Image: <input type="file" name="image_file" size="20"><br> <font size="1">Click browse to upload a local file</font><br> Comment: <textarea name="comment" rows="2" cols="25"></textarea> <br> <input type="hidden" name="type" value="multiple" /> <input name="action" type="submit" value="Upload Image"> <input type="hidden" name="type" value="multiple"> </div> </fieldset> </form>
  10. So are you recomending I do this instead? <?php include ('header.inc.php'); ?> <?php session_start(); ?>
  11. Is anyone able to give an assitance with this. Thanks for the help.
  12. Does that example help?
  13. Well here is form1.php (actually called step1.php) so here is the code for it, perhaps this will help and thank you both. <?php session_start(); ?> <?php include ('header.inc.php'); ?> <div class = "nround"> <div class = "ntop"><h2>Become a hotspot</h2></div> <div class = "nmiddle" align="left"> <form name="step1" method="post" action="step2.php"> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody> <tr> <td colspan="2"><b>Please enter a username and password that you will use to access your account.</b> </td> </tr> <tr> <td class="required">Username</td> <td class="required"><input type="text" name="username" size="20" maxlength="15" value="<?php if( isset($_SESSION['form1']['username']) ) echo $_SESSION['form1']['username']; ?>" /></td> </tr> <tr> <td class="required">Password</td> <td class="required"><input type="password" name="password" size="20" maxlength="15" value="<?php if( isset($_SESSION['form1']['password']) ) echo $_SESSION['form1']['password']; ?>" /></td> </tr> <tr> <td colspan="2"><b>Please enter a valid e-mail address to use in order to activate your account.</b> </td> </tr> <tr> <td class="required">Company Name</td> <td class="required"><input type="text" name="comp_name" size="20" maxlength="15" value="<?php if( isset($_SESSION['form1']['comp_name']) ) echo $_SESSION['form1']['comp_name']; ?>" /></td> </tr> <tr> <td class="required">Establishment Type</td> <td class="required"> <select name="comp_type" value="<?php if( isset($_SESSION['form1']['comp_type']) ) echo $_SESSION['form1']['comp_type']; ?>" /> <option selected>- Select One -</option> <option id="bars" value="Bar">Bar</option> <option id="clubs" value="Club">Club</option> <option id="coffee_shops" value="Coffee Shop">Coffee Shop</option> <option id="resturants" value="Resturant">Resturant</option> </select> </td> </tr> <tr> <td class="required">Address</td> <td class="required"><input type="text" name="comp_address" size="30" maxlength="30" value="<?php if( isset($_SESSION['form1']['comp_address']) ) echo $_SESSION['form1']['comp_address']; ?>" /></td> </tr> <tr> <td class="required">City/Zip</td> <td class="required"><input type="text" name="comp_city" size="10" maxlength="30" value="<?php if( isset($_SESSION['form1']['comp_city']) ) echo $_SESSION['form1']['comp_city']; ?>" /> <input type="text" name="comp_zip" size="5" maxlength="5" value="<?php if( isset($_SESSION['form1']['comp_zip']) ) echo $_SESSION['form1']['comp_zip']; ?>" /></td> </tr> <tr> <td class="required">Phone Number</td> <td>(<input type="text" name="comp_area" size="1" maxlength="3" value="<?php if( isset($_SESSION['form1']['comp_area']) ) echo $_SESSION['form1']['comp_area']; ?>" />) - <input type="text" name="comp_phone" size="8" maxlength="8" value="<?php if( isset($_SESSION['form1']['comp_phone']) ) echo $_SESSION['form1']['comp_phone']; ?>" /></td> </tr> <tr> <td class="required">Email Address</td> <td><input type="text" name="comp_email" size="30" maxlength="20" value="<?php if( isset($_SESSION['form1']['comp_email']) ) echo $_SESSION['form1']['comp_email']; ?>" /></td> </tr> <tr> <td class="required">Website Address</td> <td><input type="text" name="comp_web" size="30" maxlength="20" value="<?php if( isset($_SESSION['form1']['comp_web']) ) echo $_SESSION['form1']['comp_web']; ?>" /></td> </tr> <tr> <td class="required" valign="top">Description</td> <td><textarea name="comp_desc" cols="50" rows="12"> <?php if( isset($_SESSION['form1']['comp_desc']) ) echo $_SESSION['form1']['comp_desc']; ?></textarea></td> </tr> <tr> <td class="verdana11" align="right" width="125"><p></td> <td><a href="step2.php"><img src="img/step2.gif" alt="" border="0"></a></td> </tr> </tbody> </table> </form> </div> <div class = "nbottom"></div> </div> <?php include ('footer.inc.php'); ?> I havent touched this project for sometime so its a little rough and I may change up quite a few things.
  14. Any ideas or suggestions on this one?
  15. I was hoping I could just edit the last post. Anyway I should mention I do have form3.php working using... <?php session_start(); //below is the session code for step3.php foreach( $_POST as $key => $val ) { $_SESSION['form3'][$key] = $val; } ?> I have this posted on from4.php and this works, so is there a way I could use something like this but for all 3 forms, without any issues?
  16. Ok I have an account creation system that consists of 3 forms. I have done alot of reading on sessions, and as I understand what they do and how they work, I dont understand how to actually implement it into my forms. Now form1.php is all input boxes as is form3.php but form2.php has one section of check boxes. Then I have form4.php which is where all the input that was put into the other forms will be "echoed" for the person to verify all the information. With all that said I guess here is a simple way to ask the question and perhaps get an answer that will help me with all of this. Since there is so much code on the forms thats why I havent posted them. Ok so can anyone give me an example that would work for what I am looking to do? Thanks alot for the help
  17. Would that scenario still be approached the same way? I have tried what you recomended and I have gotten folders to be created but not the image or thumbnail to be put into the new directories. Any ideas?
  18. Well this is going to be used in an administration environment so security isnt really an issue, but the reason I wanted it set up so you could just type in a path is that the path and image info will also be submitted to a db. So all of it will actually take care of a number of steps so I dont have to As I am sure you may (or may not) have noticed is that this code is kind of a compilation of a few projects. I suppose I could make the root path the directory that the script sits in then use the form to create the image paths as needed inside it. In case it helps, here is a little scenario. Im putting together a very small site for trips I take and photos i take on the trips. So lets say my upload script/form sits in a folder called "root" and I go to South Dakota. I take a ton of pictures and then want to upload them to the server. So in the input box of the form, for the path of the image im uploading, I type "/southdakota" (full path would then be /root/southdakota) then I type the path for the thumb that gets created as "/southdakota/thumbs". Now if these directories dont exist then id like the script to create them otherwise just add the images to the paths. I dont know if that changes the approach at all but thats what I am looking to do. thanks for your input
  19. I have an upload form I am working on. Right now it all works great but rather than it uploading to a hard coded path I would like the form to be able to upload an image and a created thumb to a user defined path (i.e /image, /image/thumb), via two input boxes. Here is what I have right now for code. I know the code is a little rough its still a WIP. <?php include_once ('db_connect_images.php'); ?> <?php //This page allows users to upload files tot he server //Set the page title and include the header $page_title = 'Upload an Image'; //include ('db_scripts/db_connect_insert_2.php'); //$db->connect('images'); if (isset($_POST['action'])) { $imageDir = 'image/'; //// root directory to main images folder with trailing slash $imageName = $imageDir . $_FILES['image_file']['name']; //// if (move_uploaded_file($_FILES['image_file']['tmp_name'], $imageName)) { $array = explode(".", $_FILES['image_file']['name']); $nr = count($array); $ext = '.' . $array[$nr-1]; ///// Insert data into the DB $insert = "INSERT INTO images (dir, ext, comment, date_added) VALUES ('" . $imageDir . "', '" . $ext . "', '$_POST[comment]', NOW())"; $insertresults = mysql_query($insert) or die(mysql_error()); $lastpicid = mysql_insert_id(); $newfilename = $lastpicid . $ext; rename($imageName, $imageDir . $newfilename); include_once('class.thumbnail.php'); ////// TAKE THE ORIGINAL IMAGE AND RESIZE IT TO A SLIGHTLY SMALLER ONE //// go and get the uploaded image $large = new Thumbnail('image/' . $newfilename . ''); //// and resize it to dimensions equal to or smaller than 800x600 $large->resize(800,600); //// now save it $large->save('image/' . $newfilename . '',100); //$large->destruct(); //only needed for PHP4 ////// NOW TAKE THE NEWLY RESIZED IMAGE AND CREATE A THUMBNAIL FROM IT // go and get the resized image $thumb = new Thumbnail('image/' . $newfilename . ''); // resize it to no larger than 200x200 $thumb->resize(100,100); // now to create thumbnails all the same size, create a 120x120 image, starting from the center //$thumb->cropFromCenter(200); $thumb->createReflection(50,50,50,true,'#ffffff'); /// save the resized/cropped image to the thumbnails folder $thumb->save('imagethumbs/' . $newfilename . '',100); //$thumb->destruct(); //only needed for PHP4 if ($insertresults) { $message = 'Image Added'; } else { $message = 'Image Failed'; } } else { $message = 'Image Failed to Upload'; } } if (isset($_POST['delete'])) { foreach ($_POST as $id => $value) { if (is_numeric($id) && $value == 'delete') { $sql = mysql_query("SELECT * FROM images WHERE id = '". $id ."'"); $rows = mysql_fetch_array($sql); $query = "DELETE from images WHERE id = '" . $id . "'"; $result = mysql_query($query); $largeimg = unlink('image/' . $id . $rows['ext'] . ''); $thumbimg = unlink('imagethumbs/' . $id . $rows['ext'] . ''); } } } ?> <?php echo '<div class = "nround">'; echo '<div class = "ntop"><h2>Upload Images</h2></div>'; echo '<div class = "nmiddle" align="left">'; echo '<fieldset class="display" align="center">'; echo '<div class="display" align="center" >'; $sql = "SELECT * FROM images ORDER BY id ASC"; $query = mysql_query($sql); $count = mysql_num_rows($query); if ($count == 0) { echo 'You have not uploaded any pictures yet!'; } else { echo ' <form action="" method="POST">'; while ($rows = mysql_fetch_array($query)) { echo'<div style="border: 2px solid #fff; margin: 5px; float: left;"> <div> <a href="images/' . $rows['id'] . $rows['ext'] . '" rel="lightbox"><img src="imagethumbs/' . $rows['id'] . $rows['ext'] . '"/></a> </div> <div> <input type="hidden" name="image_name" value="' . $rows['image_name'] . '"> <input type="checkbox" name="' . $rows['id'] . '" value="delete"> </div> </div>'; } echo '<div id="delete"><input type="submit" name="delete" value="Delete Images"> </div> </form>'; } echo '</div>'; echo '</fieldset>'; ?> <div align="left"><h2><font color="#b80101">Upload Images</font></h2></div> <form method="POST" enctype="multipart/form-data" name="image_upload_form" action=""> <fieldset> <p>Image Folders Location <input type="text" size="32" name="folder" value="" /></p> <p>Thumbnail Folder Location <input type="text" size="32" name="thumbfolder" value="" /></p> <div align="left"> <p>Upload Image: <input type="file" name="image_file" size="20"><br> <font size="1">Click browse to upload a local file</font><br> Comment: <textarea name="comment" rows="2" cols="25"></textarea> <br> <input type="hidden" name="type" value="multiple" /> <input name="action" type="submit" value="Upload Image"> <input type="hidden" name="type" value="multiple"> </div> </fieldset> </form> <?php // we first include the upload class, as we will need it here to deal with the uploaded file include_once'class.upload.php'; if ($_POST['type'] == 'multiple') { $folder=$_POST['folder']; $thumbs=$_POST['thumbfolder']; $handle->Process($folder); // we check if everything went OK if ($handle->processed) { // everything was fine ! echo '<fieldset>'; echo ' <legend><h3>Large Image Uploaded</h3></legend>'; echo ' <p>' . round(filesize($handle->file_dst_pathname)/256)/4 . 'KB</p>'; echo ' View Image Uploaded: <a href="'.$folder.'' . $handle->file_dst_name . '">' . $handle->file_dst_name . '</a>'; echo '</fieldset>'; } else { // one error occured echo '<fieldset>'; echo ' <legend><h3>Large Image Not Uploaded</h3></legend>'; echo ' Error: ' . $handle->error . ''; echo '</fieldset>'; } $handle->Process($thumbs); // we check if everything went OK if ($handle->processed) { // everything was fine ! echo '<fieldset>'; echo ' <legend><h3>Thumbnail Created and Uploaded</h3></legend>'; echo ' <p>' . round(filesize($handle->file_dst_pathname)/256)/4 . 'KB</p>'; echo ' View Thumbnail Uploaded: <a href="'.$thumbs.'' . $handle->file_dst_name . '">' . $handle->file_dst_name . '</a>'; echo '</fieldset>'; } else { // one error occured echo '<fieldset>'; echo ' <legend><h3>Thumbnail not created and not uploaded</h3></legend>'; echo ' Error: ' . $handle->error . ''; echo '</fieldset>'; } } else { } ?> I have looked up and down google for a few days now and I just cant seem to find anything even close to what Im looking to do even though I know people have done this over and over. Any help on this would be very greatly appreciated. Thanks much
  20. So lets say I have a drop down menu in a form, and I will have a folder already made for each of the possible selections in the drop down menu. How could I set this up to have the persons account go into a folder that they chose from the drop down? Ok to explain this more clear. I have an account system I am setting up, which consist of 3 forms. The first form has a drop down whos options are "clubs", "bars", "resturants", and "coffee_shops". So lets say someone is setting up an account for a resturant of theirs. So they pic "resturant" from the drop down. How can i set this up so that a personalized folder form them will go into the resturant folder? Thank you guys for the help
  21. Im wondering if anyone knows of or has a script that would do this. I need a script that will create a directory (which will be named whatever is entered into a text box) and once a directory is created, it needs to have the ability to copy some folders/files into that directory. Any ideas?
  22. crazy8

    SESSION

    As far as putting a ton of stuff into a session could I put it into an array then into a session and do something like this? <?php // begin the session session_start(); // create an array $step1=array('comp_type', 'comp_name', 'comp_address', 'comp_phone', 'comp_desc', 'comp_email',' comp_web') //I would include values for form 2 and 3 here to wouldnt I? // put the array in a session variable $_SESSION['signup']=$step1; ?>
  23. crazy8

    SESSION

    Any ideas how to pull this off?
  24. crazy8

    SESSION

    Im sorry. Here is form 2 <div align="left"><h2><font color="#b80101">Types of Cuisine</font></h2></div> <fieldset align="center"> <table> <tr> <td><input type="checkbox" name="afghan"/></td><td>Afghan</td> <td><input type="checkbox" name="caribbean"/></td><td>Caribbean</td> <td><input type="checkbox" name="greek"/></td><td>Greek</td> <td><input type="checkbox" name="korean"/></td><td>Korean</td> <td><input type="checkbox" name="pizza"/></td><td>Pizza</td> <td><input type="checkbox" name="swedish"/></td><td>Swedish</td> </tr> <tr> <td><input type="checkbox" name="american"/></td><td>American</td> <td><input type="checkbox" name="chinese"/></td><td>Chinese</td> <td><input type="checkbox" name="indian"/></td><td>Indian</td> <td><input type="checkbox" name="lebanese"/></td><td>Lebanese</td> <td><input type="checkbox" name="peruvian"/></td><td>Peruvian</td> <td><input type="checkbox" name="sweets"/></td><td>Sweets</td> </tr> <tr> <td><input type="checkbox" name="appetizers"/></td><td>Appetizers</td> <td><input type="checkbox" name="cuban"/></td><td>Cuban</td> <td><input type="checkbox" name="irish"/></td><td>Irish</td> <td><input type="checkbox" name="mediterranean"/></td><td>Mediterranean</td> <td><input type="checkbox" name="portuguese"/></td><td>Portuguese</td> <td><input type="checkbox" name="thai"/></td><td>Thai</td> </tr> <tr> <td><input type="checkbox" name="brazilian"/></td><td>Brazilian</td> <td><input type="checkbox" name="french"/></td><td>French</td> <td><input type="checkbox" name="italian"/></td><td>Italian</td> <td><input type="checkbox" name="mexican"/></td><td>Mexican</td> <td><input type="checkbox" name="southwestern"/></td><td>South Western</td> <td><input type="checkbox" name="turkish"/></td><td>Turkish</td> </tr> <tr> <td><input type="checkbox" name="cajun&creole"/></td><td>Cajun & Creole</td> <td><input type="checkbox" name="german"/></td><td>German</td> <td><input type="checkbox" name="japanese"/></td><td>Japanese</td> <td><input type="checkbox" name="middle_eastern"/></td><td>Middle Eastern</td> <td><input type="checkbox" name="spanish"/></td><td>Spanish</td> <td><input type="checkbox" name="vietnamese"/></td><td>Vietnamese</td> </tr> </table> Ill take a look at what you have posted for the examples and see if I understand whats going on UPDATE: Ok i have looked it over, I understand whats going on now. So now I have a few more questions. 1) How do I incorporate so much data into a single (or a few) sessions? 2) I also have an image uploading script which is part of form2. Do you think id have to worry about anything with that? 3) Once all the session stuff is built how do I take all the data from the session and insert everything into the db?
  25. crazy8

    SESSION

    Ok I have a little bit of an issue. I have a site im doing which has 3 forms to be filled out by potential customers who would like to open an account. My plan is that after all three forms get filled out all the info will be echoed onto a page for them to look at and verify all the info is correct. If all is good then the form will be submitted and entered into the db. If there is a mistake then I need to allow them to go back to what ever form the mistake is on, and have them correct it. So the problem is that I have next to NO experiance with sessions and even though I understand the logic im clueless as to how to correctly program them. So my question is this. Below is my first of 3 forms. If someone could possibly show me how to do what I need to do on this form I will figure out the rest from there. I learn a bit better from example and when I can see something as a whole. <div class = "nround"> <div class = "ntop"><h2>Become a hotspot</h2></div> <div class = "nmiddle" align="left"> <form name="step1" method="post" action="basic2.php"> <?php include ('db_scripts/db_connect_insert.php'); ?> <table border="0" cellpadding="2" cellspacing="0" width="100%"> <tbody><tr> <td colspan="2"><b>Please enter a valid e-mail address. You will need to confirm your e-mail address to activate your account.</b> </td> </tr> <tr> <td class="required">Company Name</td> <td class="required"><input type="text" name="comp_name" size="20" maxlength="15" /></td> </tr> <tr> <td class="required">Establishment Type</td> <td class="required"> <select name="comp_type"> <option selected>- Select One -</option> <option value="bars">Bar</option> <option value="clubs">Club</option> <option value="coffee_shops">Coffee Shop</option> <option value="resturants">Resturant</option> </select> </td> </tr> <tr> <td class="required">Address</td> <td class="required"><input type="text" name="comp_address" size="30" maxlength="30" /></td> </tr> <tr> <td class="required">Phone Number</td> <td><input type="text" name="comp_phone" size="20" maxlength="40" /></td> </tr> <tr> <td class="required">Email Address</td> <td><input type="text" name="comp_email" size="30" maxlength="20" /></td> </tr> <tr> <td class="required">Website Address</td> <td><input type="text" name="comp_web" size="30" maxlength="20" /></td> </tr> <tr> <td class="required">Description</td> <td><textarea name="comp_desc" cols="30" rows="12" ></textarea></td> </tr> <tr> <td class="verdana11" align="right" width="125"><p></td> <td><input onClick="basic2.php" type="submit" name="submit" value="Go to step 2" /></td> </tr> </tbody> </table> </form> </div> <div class = "nbottom"></div> </div> Thank you all so much for the help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.