Jump to content

batstanggt

Members
  • Posts

    129
  • Joined

  • Last visited

    Never

Everything posted by batstanggt

  1. Which is more secure htmlentities($_server[php_self] ) or just having the action attribute of a form link to an external .php page? -SB
  2. How does one get a BLOB to display inside a "lightbox"? -SB
  3. Im finding increasingly a better question might be what cant you do with php? LOL how ever my question this time is....Is it possible to create a folder and then a few subfolders within that folder upon register? -SB
  4. Thanks amg182 for sticking with this thread and helping me out. If you would be so kind as to supply me the script that would be tremendous. I mean who knows I may get halfway into the BLOB thing and change my mind in which case it would be even better (call it...contingency planning) hahah. Also to at least i know im starting with something that works and as you suggested i may be able to find a way (probably with the help of you guys) to make it work with BLOBs thanks again. -SB
  5. I think I'm going to use BLOB. It suits my application much better. AMG thanks for your help. No I dont have a script yet because I have yet to decide which client side script I am going to use. Do you perhaps know of a good reliable javascript to use as a starting point? I only say javascript specifically because it sounds like youve done this before. -SB
  6. I dont yet have the table with the images in the database yet. But just so i know once I get to that point (BLOB or filename) which should I use or should i say how do i know when to use each? What is BLOB anyways Ive seen this term used quite frequently in my research. -SB
  7. OK so whats the verdict is it pagination? Or is it Javascript? I dont really want any swanky effects just the ability to click a left and right arrows underneath an image and then have the image be change obviously according to the clicks. However I do want to get the image from a database not just written into the code. The more i write/ read about it the more it seems like ill have to use a server side (php) and client side ( i guess javascript or jquery) script. Is this correct? -SB
  8. So then how does one go about doing that . When I google it all I get is a million people trying to sell me something. Or give me something pre-packed. -SB
  9. Is it possible to use php to get images from a database and display them in a slideshow format? Or is that only possible through the cursed javascript? -SB
  10. Im looking to collect a birthdate from a registration form and send it to my mysql database. Whats the most simplistic way to achieve this? -SB
  11. The flurry of activity is greatly appreciated. I dont have alot of experience with strings and despite the fact manix that your suggestion did not go unconsidered based upon my own skillset I think I will use the DATE column, and perhaps a drop down menu in the register table to select the date so that way invalid dates arent even an option for the user to enter, if you catch my drift. Silkfire yes i would love to know how to calculate age based on todays date that would be fantastic. Also could someone show me how to create drop down menus for year, month, and day. Anyone else can feel free to chime in with these answers as well hahaha. Thanks again guys. -SB
  12. My question was somewhat two pronged I was yes lookin for suggestions on the form and then i was also inquiring as to what the correct way to store a date (ie. format 06/29/1988 vs. 1988-06-29 etc...). -SB
  13. hey guys heres my current registration script how does one enter d.o.b ? And what is the proper format in the mysql table? <form name="login" method="post" action="registration.php"> <table border="5" width="377" align="center" bordercolor="#00CC00"> <tr> <td width="219" bgcolor="#00cc00"> <p align="center"><font color="white"><span style="font-size:12pt;"><b>Registration</b></span></font></p> </td> </tr> <tr> <td width="219"> <table border="0" width="282" align="center"> <tr> <td width="116"><span style="font-size:10pt;">Name:</span></td> <td width="156"><input type="text" name="name" maxlength="100"></td> </tr> <tr> <td width="116"><span style="font-size:10pt;">Email:</span></td> <td width="156"><input type="text" name="email" maxlength="100"></td> </tr> <tr> <td width="116"><span style="font-size:10pt;">Username:</span></td> <td width="156"><input type="text" name="username"></td> </tr> <tr> <td width="116"><span style="font-size:10pt;">Password:</span></td> <td width="156"><input type="password" name="password"></td> </tr> <tr> <td width="116"> </td> <td width="156"> <p align="right"><input type="submit" name="submit" value="Submit"></p> </td> </tr> </table> </td> </tr> <tr> <td width="219" bgcolor="#00cc00"> </td> </tr> </table> </form> thats the html and heres the .php <?PHP //Database Information $dbhost = "localhost"; $dbname = "mydatabase"; $dbuser = "root"; $dbpass = "rootpass"; //Connect to database mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $name = $_POST['name']; $email = $_POST['email']; $username = $_POST['username']; $password = md5($_POST['password']); // lets check to see if the username already exists $checkuser = mysql_query("SELECT username FROM users WHERE username='$username'"); $username_exist = mysql_num_rows($checkuser); if($username_exist > 0){ echo "I'm sorry but the username you specified has already been taken. Please pick another one."; unset($username); include 'register.html'; exit(); } // lf no errors present with the username // use a query to insert the data into the database. $query = "INSERT INTO users (name, email, username, password) VALUES('$name', '$email', '$username', '$password')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "You have successfully Registered"; // mail user their information $yoursite = 'www.abcd.com'; $webmaster = 'Sdot'; $youremail = 'emailaddy'; $subject = "You have successfully registered at $yoursite..."; $message = "Dear $name, you are now registered at our web site. To login, simply go to our web page and enter in the following details in the login form: Username: $username Password: $password Please print this information out and store it for future reference. Thanks, $webmaster"; mail($email, $subject, $message, "From: $yoursite <$youremail>\nX-Mailer:PHP/" . phpversion()); echo "Your information has been mailed to your email address."; ?> Any help would b great
  14. LMAO but what if each user is the only one updating this database does that make any difference. I really really do appreciate your advice like i say dont take that as a challenge of ur solution but more so curious if the fact that i wont be modifying anything has any bearing on the situation what so ever. Or just bad idea no matter what and why...please. Im of the mind that if you fish for a man he eats for a week, if you teach him to fish he eats for life hahah. Thanks guys. -SB
  15. lets just say i did want to dig my own grave and try this how would i do it what would the code be? -SB
  16. Ahhh I see. Thanks pikachu i think you are right though something did seem awkward about trying to use a relational database structure (forced if you will). Now I did follow your link but would you mind explaining ..."You need to use a normalized database structure, not attempt to force a relational database to mimic a spreadsheet". And I'm not really sure how that would create a nightmare for myself would you mind also explaining that? Im not challenging your opinion im just curious to learnin why. -SB
  17. hey guys i have a website im working on and i would like to have 5 separate tables be created in my database for each user who registers. Is it possible to use a variable taken from the register form to use in the table name? Ie... CREATE TABLE ($id)table_name ( column_name1 data_type, column_name2 data_type, column_name3 data_type, .... ) $id is obviously the variable. I dont know if that is te correct syntax but if someone could tell me how to do this that would be great. So basically the name of the table created from that would be for example 1table_name, 2table_name, 3table_name etc.... Then would I just put 5 create table statements in my registration.php page one right after another so that the tables are created as the registration is completed? I have only ever used phpmyadmin so far to create tables so im not sure about using code to create a table let alone 5 at one time hahaha. Thanks guys. -SB
  18. Hey guys sorry for the delayed response jsut finished up 14 hour work day. Anyhow Webstyles your on the right track 5 templates for each user sounds like what im trying to accomplish more so than creating individual .html pages for each user. So how does one make that happen ? Im gunna take a shot in the dark and say URL variables? lol just a guess. Thanks guys for the help and hope you dont mind helpin me a lil more. -SB
  19. Hey, I may seem like a complete moron by asking this but is it possible to have php automatically create 5 separate html pages upon register? If so what would be an example of a code to do so. -SB
  20. Thanks for all your help guys seems like I got it figured out i just changed the background of the div in the external .css and took the bgcolor attribute out of the body tag in main.html. Thanks Sensei and Teynon you guys are absolute life savers. -SB
  21. The only major issue now is that the HTML page in the right div isnt displaying correctly. For somereason the image which is on the main.html page shows up so i know it loaded correctly but the blue background for somereason is just off the screen for somereason. i can see it around the outside of the right and bottom of the page but the the div is still white. -SB
  22. Thank again guys, Sensei and Teyvon how do I write the link in the <a href> so that it knows which page to put there or is that being done correctly ? -SB
×
×
  • 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.