Jump to content

beav33

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by beav33

  1. beav33

    picture

    Ok, then you store the picture file on the server. Is there a tutorial on how to do this and retrieve the pic anywhere?
  2. beav33

    picture

    It's not? Using phpmyadmin 2.6.3. I have a table that stores some info from users. Can I make a colmn to store pictures and if so, how or what is the sql. Beter?
  3. beav33

    picture

    Know this prob stupid, but having trouble. I want to allow a user to upload a picture of their house for my real estate site. How do I design the colmn in the table with the rest of the house info. I have no clue, and no clue how to put conditions on the size. Thank you beav33
  4. You Rock, Thank You Beav33
  5. Ok on a new mission. Killed the time issue and will address it later, but I still want the date to be on central U.S. Yahoo goes off international Greenwich. So how do I subtract 6 hours with this code. <?php echo date('M d, Y');?> Thanks Beav33
  6. I'm not even sure what time zone the codes going off of if its showing the 4 of feb already. So lets say central U.S., thats where I reside.
  7. Need Help. Now on my website my echo date is showing it as the 4 of feb. I was wondering is there anyway to make it per time zone for different customers areas. code <?php echo date('M d, Y');?>Please help if possible thank you beav33
  8. What I was afraid of. I will generate a random Thank you for your help beav33
  9. Heres the prob. I have a forgot password page, and I am being lazy. I dont want to generate a new password, I just want to send them their original one. How do I unconvert the md5. [color=red]$email=$row_Recordset1['email']; $password=$row_Recordset1['password']; $toaddress = $email; $subject ='bla'; $mesg ="bla"; $fromaddress ='bla'; mail($toaddress, $subject, $mesg, $fromaddress);[/color] This sends an email with the password in md5, so how do I change it back to original form? Thank You for help beav33
  10. My question is does it matter which one you us if your search form is short. Meaning, the search form I am using is no where near 8192characters, but the results from the db will be in the thousands. So can I still use GET or do I have to use POST. Might be stupid question, but it is stumping me bad, lol. Thank you
  11. I have a page that is restricted to logged in users. What I need is a way to prevent the user from using the back button after submitting a form, so he doesnt resend it. Can someone help me please. Thank you.
  12. Try new example for some help I have a search page for houses Using city, state OR zip Also property type and price range. Now if somebody leaves property type OPTION open And price range OPTION open how do I run a wildcat search with the city, state OR zip selected, and these open, for that location With the city, state I using a query of = for state and LIKE for city. For the zip I use the = When I ad OR for property type it works but for all locations, not the state or zip selected. ex: Select * FROM houselisting WHERE (`state` = colstate OR `city` LIKE %colcity%) OR `zip` = colzip OR `propertytype` = colproperty
  13. Thank you I worked it out, but when I run a search with 2 or more varibles is there some way to run a wildcat. Meaning if someone doesnt type in a varible in say "city" for the search, then my search doesnt work. I figured out the "=" for exact and "LIKE" for something close. If its blank the search shows nothing, even if there is something for the other varible, for instance "state". Can you do something with "OR" to solve this problem or do I have to make multiple search forms to get around this. Hope this makes sense Thank you beav33 $query_Recordset1 = sprintf("SELECT propertytype, squarefootage, askingprice, `city`, `state`, zip FROM houselisting WHERE `state` = %s AND `city` LIKE CONCAT('%%', %s, '%%')"
  14. I created a db and added content to it. Now I want to get it out. I created a recordset for a simple search for houses buy state. It works fine in the test, but when I add the dynamic table I get this on the page Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\offers4house\results.php on line 12 I have followed every help page and still cant figure it out. Line 12 is the next to last line of this code for the dynamic table <table border="1" cellpadding="1" cellspacing="1"> <tr> <td>state</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Recordset1['state']; ?></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table> I can include the rest of the dreamweaver php for the recordset and query if needed. Please Please Please! Help beav33
  15. [b]In my site I set up a search page to probe the db. In dreamweaver I used a recordset, then to display the info, I used a dynamic table. Every test works fine but when uploaded the results page shows an error coming I think from the dynamic table code from this. [/b] <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> [b]Whole code for table is [/b] <?php mysql_free_results($Recordset1); ?> <table border="1" cellpadding="1"> <tr> <td>state</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Recordset1['state']; ?> </td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table [b]ERROR on page[/b] Warning: mysql_fetch_assoc(): is not a valid MySQL result resource in C:\wamp\www\offers\results.php on line 68 [b]Has anyone had this problem, or knows what this function is or why I am getting it. Any help Please Thank you beav33[/b]
  16. This is some of the code below that dreamweaver places for a registration record set. Now I want to validate some things like making sure the passwords match up and email, so on. I can't figure out how to change my code to identify it. My code is below dreamweavers, please help. // *** Redirect if username exists $MM_flag="MM_insert"; if (isset($_POST[$MM_flag])) {   $MM_dupKeyRedirect="takenusername.php";   $loginUsername = $_POST['username'];   $LoginRS__query = sprintf("SELECT username FROM register WHERE username=%s", GetSQLValueString($loginUsername, "text"));   mysql_select_db($database_db_connect, $db_connect);   $LoginRS=mysql_query($LoginRS__query, $db_connect) or die(mysql_error());   $loginFoundUser = mysql_num_rows($LoginRS);   //if there is a row in the database, the username was found - can not add the requested username   if($loginFoundUser){     $MM_qsChar = "?";     //append the username to the redirect page     if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";     $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;     header ("Location: $MM_dupKeyRedirect");     exit;   } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) {   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {   $insertSQL = sprintf("INSERT INTO register (username, password, email, companyname, firstname, lastname, phone) VALUES (%s, %s, %s, %s, %s, %s, %s)",                       GetSQLValueString($_POST['username'], "text"),                       GetSQLValueString($_POST['password'], "text"),                       GetSQLValueString($_POST['email'], "text"),                       GetSQLValueString($_POST['companyname'], "text"),                       GetSQLValueString($_POST['firstname'], "text"),                       GetSQLValueString($_POST['lastname'], "text"),                       GetSQLValueString($_POST['phone'], "text")); Dreamweaver's way to check username and varibles. My code   //create short variable names   $email=$_POST['email'];   $username=$_POST['username'];   $password=$_POST['password'];   $password2=$_POST['password2'];   $companyname=$_POST['companyname'];   $firstname=$_POST['firstname'];   $lastname=$_POST['lastname'];   $phone=$_POST['phone']; Then on down the validation     // passwords not the same     if ($password != $password2)     {       throw new Exception('The passwords you entered do not match - please go back'                           .' and try again.'); Just need to change it up a bit to work with dreamweaver's code. BUT HOW? Thank you, beav33    
  17. yes I can use sql with myphpadmin. The problem lies with the db connect with 1and1. Now that I have wamp5, I might be able to transfer the whole db to yahoo. Will try today. What host do you use pixy, if you dont mind me asking. beav33
  18. Open up phpMyAdmin in 1and1 make a new database, go to sql and import your saved sql from your laptop. Update your config file with the information that 1and1 gives you for their database and you should be all set. In 1and1, they dont let me create a db. They create it for me. For example, there is a form to describe the db, then 1and1 sets the username and pw, so on.  dbname: db164642202 username:  dbo164642202 password: V.cTEBJ2 hostname: db371.perfora.net description: book_sc This is an example of a new db, with their assigned values. When this is created I cant import a db of my own, only tables. This also puts the php5 extension back or it reverts back to earlier version making my code bad. So how in the world do you use this site. Do you have another package that allows you to create your own dbs or am I missing something? Thank you beav33
  19. Ok making progress. I downloaded wamp5 and installed it. I set up a new database and a table for a simple form to test the connection. I set up dreamweaver and got the connection. I tested it with a test entry and the data is in the table. Now for the dumb question. This is all on my laptop. How do I upload the db and website to, say 1and1. I asume I will upload this db instead of using the one they provide, or am I way off there. Once again, Thank You Very Much for the help! beav33
  20. Cool, I downloaded XAAMP and will probally have some issues for this forum soon. Got to take the wife out tonight! I didnt know that you could do that, as for up load the db. I will try it tommarrow and get back to you, Thank you for your help. beav33
  21. When I go and set up my connections dreamweaver does connect to the mysql. As far as I understand with 1and1, you have to type php5 or php4 as your extension in order for it to be the latest. This was the problem with my free hand code in the beginning. With dreamweaver, I set up the connection and then start a form page. I use my db connect and match the table in mysql. Then dreamweaver places code for the record set and anything else, like sessions or so on. The php code will not work. It wont connect. It places a db connect file on the server with a virtual function or something like that to connect to the file that connects with the db. I have tried changing the extentions from the files dreamweaver uploads to the php5 extension, but it still flags errors. Sorry really tired, so this is messy. Anyway if I replace the db connect with my own code it still has issues. As for yahoo, it blocks dreamweaver period. So I am looking for a host that I dont have to use the php5 extension, just php, and that will function with dreamweaver's code. Thank you beav
  22. I am trying to put together a job posting site. I am in the process of learning php and I have the newest dreamweaver. I need advice on a better host that is compatible with dreamweaver. So far yahoo and 1and1 are not. I am programming without dreamweaver, but it would be so much easier if I could use dreamweaver and it would connect to a mysql and understand the code. So far dreamweaver has been a waist of money because I have only been able to utilize it as a html editor, which I already had. I have heard alot of praises about this software, so I am under the impression that I need a new host or something. Any suggestions? Thank you for your time. beav33 
  23. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/0/d154345321/htdocs/ohire/member.php5:2) in /homepages/0/d154345321/htdocs/ohire/member.php5 on line 6 Could somebody help me with this. Explain what it is telling me, like header meaning the actual header or is it something else. I am trying to start a session using the username. This is the member.php5 code for session <?php require_once('this_file.php5'); session_start(); //create short variable names $username = $_Post['username']; $password = $_Post['password']; if ($username && password) // they have just tried logging in { try { login($username, $password); //if they are in the database register the user id $_SESSION['valid_user'] = $username; } catch(Exception $e) { //unsuccessful login echo 'You could not be logged in. You must be logged in to view this page'; exit; } } ?> Then the html Sorry its long and messy Please help
  24. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/0/d154345321/htdocs/ohire/member.php5:2) in /homepages/0/d154345321/htdocs/ohire/member.php5 on line 6 Could somebody help me with this. Explain what it is telling me, like header meaning the actual header or is it something else. I am trying to start a session using the username. This is the member.php5 code for session <?php require_once('this_file.php5'); session_start(); //create short variable names $username = $_Post['username']; $password = $_Post['password']; if ($username && password) // they have just tried logging in { try { login($username, $password); //if they are in the database register the user id $_SESSION['valid_user'] = $username; } catch(Exception $e) { //unsuccessful login echo 'You could not be logged in. You must be logged in to view this page'; exit; } } ?> Then the html Sorry its long and messy Please help
  25. beav33

    session

    I am new and trying to make a login page. Have the books and putting the code together. One of the examples strait out of the book Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/0/d154345321/htdocs/ohire/member.php5:2) in /homepages/0/d154345321/htdocs/ohire/member.php5 on line 6 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/0/d154345321/htdocs/ohire/member.php5:2) in /homepages/0/d154345321/htdocs/ohire/member.php5 on line 6 You could not be logged in. You must be logged in to view this page. Could somebody explain, header and why this is not working. I am using the user as the session when their validated through the database. It does the same thing with the registration. Help beav33
×
×
  • 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.