Jump to content

bnther

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bnther's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Still haven't made any progress with this issue yet. I get this error; Unhandled ioError:. text=Error #2032: Stream Error which is really weird because I'm 99% certain that my url is typed in correctly. Also, I know the code is correct, because I've uploaded it to Godaddy and everything works fine. I really couldn't guess how many hours I have into it, but I'm tired of taking a beating. Time to make a change. What is everyone using for testing their code locally? Like I mentioned before, I'm currently fighting WampServer. I've looked up Web Developer Server Suite -- it claims to be setup in minutes (Wouldn't that be nice!) I'd be interested to know what server platforms everyone is using.
  2. corbin, Thanks for the reply. I think that the issue I'm having here might be related to an earlier post of mine. http://www.phpfreaks.com/forums/index.php/topic,255735.0.html For some reason, I'm not getting a full loop on communicating with PHP. Don't have any idea of what it could be, but it's been a blatent handicap so far. I've put a lot of time into this and at this point I'm wondering if I shouldn't swap Wamp out with something else. I'm at an impasse until I can get things to work properly.
  3. I've got myself a serious roadblock with regards to PHP. I've installed WampServer 2.0 that has always worked well for HTML and Flash. I've even been successful using PHP for navigation menus. But for some reason, when I try and use php for a flash email form, I get this error "waiting for localhost". I've uploaded the flash/php code to Godaddy and it works fine there so I know it's not the code. Has anyone else heard of this? It's not going to be very productive of me to upload everything to Godaddy when building pages.
  4. Maybe this will do a little better job explaining. Step 1) From a freshly fired up computer I run the form Result) Nothing Step 2) I run the new_update.php Result) The new_update.php page displays and the database is updated. Step 3) I run the form again. Result) The new_update.php is displayed but the database is not updated. Step 4) I modify new_update.php but do not run it. Step 5) I run the form again. Result) The original new_update.php page (Step 2) is displayed and the database is not updated. Step 6) Run the new_update.php Result) The new_update.php page is displayed and the database updated. Step 7) I run the form again Result) The new_update.php from Step 6 is displayed, but the database is not updated. and so on and so on... It seems to me that the form is calling up the previously displayed new_updated.php page instead of actually running it. But I could be smoking crack too.
  5. Exactly For some reason, the form doesn't trigger the new_update.php code. More to the point, it doesn't even see it until I have run the new_update.php once by itself. At that point, it will display new_update.php ... but it won't display any of the changes I might make until I run the new_update.php again (by itself). It would be nice if this was something incredibly simple. Thanks for the feedback.
  6. I apologize for taking so long to get back. I tried the code and got this: string(11) "hello world" string(13) "hello world 2" Hello World 2 Here's the code: <?php $my_connection = mysql_connect('localhost', 'root', 'root'); if (!$my_connection){ die('Could not connect: ' .mysql_error()); } $var1 = 'hello world'; $var2 = 'hello world 2'; var_dump($var1, $var2); mysql_select_db('chamber'); /* $i = $_POST['comments']; mysql_query("UPDATE announcements SET comment_field = '".$i."' WHERE id='0'") or die(mysql_query());*/ mysql_query("UPDATE announcements SET comment_field = 'fourth attempt to verify' WHERE id='0'") or die(mysql_query()); mysql_close($my_connection); echo "Hello World 2"; ?> This was without using the form. ???
  7. I was thinking along the same lines. I've tried that and restarting the machine multiple times. I tried running it outside of Dreamweaver -- straight out of the folder with Firefox (didn't work but is that bypassing the server?). I didn't have any problems earlier this morning when I was learning how to read from a database. I used the same kind of setup with the two different files. I might try uploading the files to my Godaddy account and seeing if things work better from there. I've tried to make the files as short and as simple as I can, but I just feel like I'm missing something. I dunno. I'll give it another shot tomorrow. Thanks for all of the inputs.
  8. Thanks for the replies. I appreciate the input. I'm a bit baffled on this one. I've been wondering about this echo working while nothing else does. Truth is, it wasn't working. When I changed 'Hello World' to 'Hello World 2' there weren't any changes. Mystified, I renamed both files and tried again. This time, I ran the form first and came up with the error that the new_update.php wasn't found. ??? They're in a folder by themselves, how could they not see each other. Once I ran the new_update.php by itself, then the form would see it, but only the new_update.php that was run by itself. Consequently none of the changes I was making to the new_update.php was being seen. I've never had a file issue like this. Why would the form see it only after it has been run by itself?! A file is a file, shouldn't it be there all the time?! I've enclosed the complete code for both files: new_input.php: <!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>Untitled Document</title> </head> <!-- Start --> <body bgcolor="#d6cab6"> <form name="form1" method="post" action="new_update.php"> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> <td><textarea name="comments" id="comments" cols="26" rows="5"></textarea> <input type="submit" name="submit" id="submit" value="Submit" /> </td> </tr> </form> </body> </html> new_update.php: <?php $my_connection = mysql_connect('localhost', 'root', 'root'); if (!$my_connection){ die('Could not connect: ' .mysql_error()); } mysql_select_db('chamber'); /* $i = $_POST['comments']; mysql_query("UPDATE announcements SET comment_field = '".$i."' WHERE id='0'") or die(mysql_query());*/ mysql_query("UPDATE announcements SET comment_field = 'fifth attempt to verify' WHERE id='0'") or die(mysql_query()); mysql_close($my_connection); echo "Hello World 3"; ?> I don't get it ??? ??? The PHP Powers don't like me.
  9. Maq Thank you for the reply. I didn't know that about the reserve word...never even crossed my mind. So I went back and renamed a few things. Still didn't work, but here is what I have discovered. When I run the Update.php by itself and manually put in some text, it updates fine. But when I launch Update.php from my form page, it doesn't update. The echo "Hello World" pops up and the page looks the same, but no update. I was using the echo to gage whether or not things were working, but I guess I was off on this too. Here's the form: <!-- Start --> <body bgcolor="#d6cab6"> <div id="Global"> <div id="Workarea"> <div id="formHolder"> <form name="form1" method="post" action="Update.php"> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> <td> <textarea name="comments" id="comments" cols="26" rows="5"></textarea> <input type="submit" name="submit" id="submit" value="Submit" /> </td> </tr> </form> </div> </div> </div> </body> </html> Here's the new Update.php <?php $my_connection = mysql_connect('localhost', 'root', 'root'); if (!$my_connection){ die('Could not connect: ' .mysql_error()); } mysql_select_db('chamber'); /* $i = $_POST['comments']; mysql_query("UPDATE announcements SET comment_field = $i WHERE id='0'"); */ mysql_query("UPDATE announcements SET comment_field = 'This does update for me' WHERE id='0'"); mysql_close($my_connection); echo "Hello World"; ?> I don't understand. Even if I'm putting in text manually, why wouldn't it update simply because it was launched from a previous page?
  10. This one actually made me laugh. I have a form with a text area (id="comments") that post to Update.php Update.php mysql_select_db('chamber'); $text = $_POST['comments']; mysql_query("UPDATE announcements SET text = $text WHERE id='1'"); /* mysql_query("UPDATE announcements SET text = 'This does update' WHERE id='1'"); */ mysql_close($my_connection); echo "Hello World"; The weird thing is that "Hello World" pops up, so I kind of assumed that it's executing, but the database doesn't update. I can get it to update if I just type in text, but I'm not passing anything from the form. Without any errors it makes things difficult to work on. Any thoughts or a working example to study would be appreciated.
  11. jxrd, That did it I was kind of wondering about the my_rows all by itself. I didn't realize that you could put a NULL value to it though. That was new. Also, thank you for the ' .= ' vs writing it all out. Shortcuts like that keep me from keying in things incorrectly. Many thanks
  12. I'm following along a video tutorial for a very basic SELECT. I run the code and it returns everything that I have put in my table. The only catch is I get this error: Notice: Undefined variable: my_rows You'll see in the code that my_rows is declared, but there's nothing to define it. I'm used to Java where you always declare variable type so this is the first thing that grabbed at my attention. However, it was not defined in the tutorial so maybe that's not how things roll in PHP'ville. mysql_select_db('chamber'); $query = "SELECT * FROM announcements"; $result = mysql_query($query); $my_rows; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $my_rows = $my_rows . "{$row['text']}"; /* this is the line that's throwing the notice*/ } Any light on this subject would be appreciated.
  13. I got it The correct syntax for includes/FormProcess was echo "$commentsField"; It doesn't display worth a darn, but this is a start! My thanks to all that replied. Today was a learning experience.
  14. Thanks for the help. Here's what I've managed so far: InputForm.php <div id="formHolder"> <form name="form1" method="post" action="Output.php"> <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> <td><div align="right"> <label for="comments">Comments:</label> </div></td> <td><div align="left"> <textarea name="comments" id="comments" cols="26" rows="5"></textarea> </div></td> </tr> <label>Submit <input type="submit" name="submit" id="submit" value="Submit" /> </label> </form></div> includes/FormProcess.php <?php /* variables */ $commentsField = $_POST['comments']; echo 'hello world 2'; ?> Output.php <body> <?php include_once('includes/FormProcess.php'); ?> </body> It's been pretty successful at saying 'Hello World 2' , but I'm not getting the comments passed. I don't know the correct way of getting the variable to display. $commentsField; doesn't do it by itself. I'll take a look for some page counter tutorials and see what I can come up with. Also, I am interested in eventually going the database route (if I could find a good video). I could definitely put to use something like that where I can upload images along with a brief description. At the moment, my galleries have all been html or Flash/XML ie; I'm the only one that can change them. It'd be nice to let the users monkey with that instead of reinstalling a backup copy after things didn't work out.
  15. Thank you gevans for the reply. I looked over that tutorial and I'm thinking that might be a little overkill for what I'm looking for. I might be over simplifying it, but it seems to me that what I really need is A) a form with a text area, B) a PHP file to hold the info in a variable, and then finally C) a command in the final web page that would display the info. Is that right or am I off? I've been Goggling like a fool today but I haven't come across anything like that, so maybe it's not really that easy.
×
×
  • 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.