
3raser
Members-
Posts
815 -
Joined
-
Last visited
Everything posted by 3raser
-
So annoying! - After clicking submit, nothing happens
3raser replied to 3raser's topic in PHP Coding Help
If it worked, it would go to the part that says: "Success", but no, when I click "Edit Review", it doesn't do anything! http://www.domination.comyr.com/edit.php?id=1 Use the code: f2a76h -
So annoying! - After clicking submit, nothing happens
3raser replied to 3raser's topic in PHP Coding Help
I didn't add it because I wanted to make sure everything works first. New code, found some bugs, but it still doesn't work: <html> <head> <title>Review Tracks</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <center> <div class="holder"> <?php $one = 1; $checker = $_POST['checker']; $id = $_GET['id']; $id2 = $_POST['id2']; $passcode = $_GET['passcode']; $passcode2 = $_POST['passcode2']; $mysql_host = ""; $mysql_database = ""; $mysql_user = ""; $mysql_password = ""; //connect to database mysql_connect("$mysql_host","$mysql_user","$mysql_password"); mysql_select_db("$mysql_database"); //extract $extract = mysql_query("SELECT * FROM reviews WHERE id='$id'"); $numrows = mysql_num_rows($extract); while ($row = mysql_fetch_assoc($extract)) { $dpasscode = $row['passcode']; } $design2 = $_POST['design']; $designt2 = $_POST['designtext']; $grammar2 = $_POST['grammar']; $grammart2 = $_POST['grammartext']; $layout2 = $_POST['layout']; $layoutt2 = $_POST['layouttext']; $moderation2 = $_POST['moderation']; $moderationt2 = $_POST['moderationtext']; $activity2 = $_POST['activity']; $activityt2 = $_POST['activitytext']; $overall2 = $_POST['overall']; $overallt2 = $_POST['overalltext']; $design2 = mysql_real_escape_string($design); $designt2 = mysql_real_escape_string($designt); $grammar2 = mysql_real_escape_string($grammar); $grammart2 = mysql_real_escape_string($grammart); $layout2 = mysql_real_escape_string($layout); $layoutt2 = mysql_real_escape_string($layoutt); $moderation2 = mysql_real_escape_string($moderation); $moderationt2 = mysql_real_escape_string($moderationt); $activity2 = mysql_real_escape_string($activity); $activityt2 = mysql_real_escape_string($activityt); $overall2 = mysql_real_escape_string($overall); $overallt2 = mysql_real_escape_string($overallt); $passcode2 = mysql_real_escape_string($passcode); $ip = $_SERVER['REMOTE_ADDR']; if (!$id && !$id2) { echo '<div id="signuptop"></div><div id="signup">Please choose a Review to edit first! <a href="index.php">Back</a></div>'; } else if (!$passcode && !$passcode2) { echo '<div id="signuptop">Pass-code Required</div><div id="signup">Please enter in the Pass-code to edit this review.<br/><br/><form action="edit.php" method="GET"><input type="hidden" name="id" value="'. $id .'"><input type="text" name="passcode" maxlength="6"><input type="submit" value="Enter"></form><br/><br/></div>'; } else if($passcode==$dpasscode) { //extract $extract = mysql_query("SELECT * FROM reviews WHERE id='$id'"); $numrows = mysql_num_rows($extract); while ($row = mysql_fetch_assoc($extract)) { $id = $row['id']; $name = $row['name']; $site = $row['url']; $design = $row['design']; $designt = $row['designt']; $grammar = $row['grammar']; $grammart = $row['grammart']; $layout = $row['layout']; $layoutt = $row['layoutt']; $moderation = $row['moderation']; $moderationt = $row['moderationt']; $activity = $row['activity']; $activityt = $row['activityt']; $overall = $row['overall']; $overallt = $row['overallt']; $total = $row['total']; $views = $row['views']; $status = $row['status']; } echo '<div id="signuptop">Edit a Review</div><div id="signup"><form action="edit.php" method="POST"><br/> <input type="hidden" name="id2" value="'. $id .'"> <input type="hidden" name="passcode2" value="'. $passcode .'"> Appearance: <select name="design"> <option value="'. $design .'">'. $design .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br/> <textarea name="designtext" cols="30" rows="13" maxlength="450">'. $designt .'</textarea><br/> <br/><br/>Grammar Usage <select name="grammar"> <option value="'. $grammar .'">'. $grammar .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="grammartext" cols="30" rows="13" maxlength="450">'. $grammart .'</textarea><br/> <br/><br/>Layout <select name="layout"> <option value="'. $layout .'">'. $layout .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="layouttext" cols="30" rows="13" maxlength="450">'. $layoutt .'</textarea><br/> <br/><br/>Moderation <select name="moderation"> <option value="'. $moderation .'">'. $moderation .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="moderationtext" cols="30" rows="13" maxlength="450">'. $moderationt .'</textarea><br/> <br/><br/>User Activity <select name="activity"> <option value="'. $activity .'">'. $activity .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="activitytext" cols="30" rows="13" maxlength="450">'. $activityt .'</textarea><br/> <br/><br/>Overall Score <select name="overall"> <option value="'. $overall .'">'. $overall .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="overalltext" cols="30" rows="13" maxlength="450">'. $overallt .'</textarea><br/> <input type="hidden" name="checker" value="1"> <br/><br/><br/> <input type="submit" value="Edit Review"></form></div>'; } else if($checker==$one) { echo '<div id="signuptop">Success</div><div id="signup">You have successfully edited the review! Why not check it out at <a href="view.php?tracker='. $id .'">here</a>!</div>'; } else { echo '<div id="signuptop">Error</div><div id="signup">The passcode you entered did not match the one of the review your trying to edit. <a href="index.php">Home</a></div>'; } ?> </div> </center> </body> </html> -
So annoying! - After clicking submit, nothing happens
3raser replied to 3raser's topic in PHP Coding Help
Everything is fine, I changed it. I just hate how I can NEVER edit my post. And I have to many problems trying to setup Xampp or whatever it is. -
So annoying! - After clicking submit, nothing happens
3raser replied to 3raser's topic in PHP Coding Help
Can't, doesn't let me edit my post. Whenever someone posts after my last post, it locks my post. Dunno why. -
I'm trying to make it so people can edit their reviews after they have created them. The problem is that when I click "Edit Review", after I changed everything, it does nothing. I want it to go to "Success", but I don't know how to solve this problem. I've looked at it for about an hour, and I'm not sure why it isn't doing anything. At first the variables are GET, and the code reads to make sure id and passcode exist. But the edit form is POST, so all I did was make hidden inputs that carry over the GET and put them in POST form. But like I said, nothing happens when I click "Edit Review". <html> <head> <title>Review Tracks</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <center> <div class="holder"> <?php $checker = $_POST['checker']; $id = $_GET['id']; $id2 = $_POST['id2']; $passcode = $_GET['passcode']; $passcode2 = $_POST['passcode2']; $mysql_host = "**********"; $mysql_database = "************"; $mysql_user = "*************"; $mysql_password = "************"; //connect to database mysql_connect("$mysql_host","$mysql_user","$mysql_password"); mysql_select_db("$mysql_database"); //extract $extract = mysql_query("SELECT * FROM reviews WHERE id='$id'"); $numrows = mysql_num_rows($extract); while ($row = mysql_fetch_assoc($extract)) { $dpasscode = $row['passcode']; } $design = $_POST['design']; $designt = $_POST['designtext']; $grammar = $_POST['grammar']; $grammart = $_POST['grammartext']; $layout = $_POST['layout']; $layoutt = $_POST['layouttext']; $moderation = $_POST['moderation']; $moderationt = $_POST['moderationtext']; $activity = $_POST['activity']; $activityt = $_POST['activitytext']; $overall = $_POST['overall']; $overallt = $_POST['overalltext']; $design = mysql_real_escape_string($design); $designt = mysql_real_escape_string($designt); $grammar = mysql_real_escape_string($grammar); $grammart = mysql_real_escape_string($grammart); $layout = mysql_real_escape_string($layout); $layoutt = mysql_real_escape_string($layoutt); $moderation = mysql_real_escape_string($moderation); $moderationt = mysql_real_escape_string($moderationt); $activity = mysql_real_escape_string($activity); $activityt = mysql_real_escape_string($activityt); $overall = mysql_real_escape_string($overall); $overallt = mysql_real_escape_string($overallt); $passcode = mysql_real_escape_string($passcode); $ip = $_SERVER['REMOTE_ADDR']; if (!$id && !$id2) { echo '<div id="signuptop">No review found</div><div id="signup">Please choose a Review to edit first! <a href="index.php">Back</a></div>'; } else if (!$passcode && !$passcode2) { echo '<div id="signuptop">Pass-code Required</div><div id="signup">Please enter in the Pass-code to edit this review.<br/><br/><form action="edit.php" method="GET"><input type="hidden" name="id" value="'. $id .'"><input type="text" name="passcode" maxlength="6"><input type="submit" value="Enter"></form><br/><br/></div>'; } else if($passcode==$dpasscode) { //extract $extract = mysql_query("SELECT * FROM reviews WHERE id='$id'"); $numrows = mysql_num_rows($extract); while ($row = mysql_fetch_assoc($extract)) { $id = $row['id']; $name = $row['name']; $site = $row['url']; $design = $row['design']; $designt = $row['designt']; $grammar = $row['grammar']; $grammart = $row['grammart']; $layout = $row['layout']; $layoutt = $row['layoutt']; $moderation = $row['moderation']; $moderationt = $row['moderationt']; $activity = $row['activity']; $activityt = $row['activityt']; $overall = $row['overall']; $overallt = $row['overallt']; $total = $row['total']; $views = $row['views']; $status = $row['status']; } echo '<div id="signuptop">Edit a Review</div><div id="signup"><form action="edit.php" method="POST"><br/> <input type="hidden" name="id2" value="'. $id .'" method="POST"> <input type="hidden" name="passcode2" value="'. $passcode .'"> Appearance: <select name="design"> <option value="'. $design .'">'. $design .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br/> <textarea name="designtext" cols="30" rows="13" maxlength="450">'. $designt .'</textarea><br/> <br/><br/>Grammar Usage <select name="grammar"> <option value="'. $grammar .'">'. $grammar .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="grammartext" cols="30" rows="13" maxlength="450">'. $grammart .'</textarea><br/> <br/><br/>Layout <select name="layout"> <option value="'. $layout .'">'. $layout .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="layouttext" cols="30" rows="13" maxlength="450">'. $layoutt .'</textarea><br/> <br/><br/>Moderation <select name="moderation"> <option value="'. $moderation .'">'. $moderation .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="moderationtext" cols="30" rows="13" maxlength="450">'. $moderationt .'</textarea><br/> <br/><br/>User Activity <select name="activity"> <option value="'. $activity .'">'. $activity .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="activitytext" cols="30" rows="13" maxlength="450">'. $activityt .'</textarea><br/> <br/><br/>Overall Score <select name="overall"> <option value="'. $overall .'">'. $overall .'</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> /10<br /> <textarea name="overalltext" cols="30" rows="13" maxlength="450">'. $overallt .'</textarea><br/> <input type="hidden" name="checker" value="1"> <br/><br/><br/> <input type="submit" value="Edit Review"></form></div>'; } elseif($checker=="1") { echo '<div id="signuptop">Success</div><div id="signup">You have successfully edited the review! Why not check it out at <a href="view.php?tracker='. $id .'">here</a>!</div>'; } ?> </div> </center> </body> </html>
-
When I'm using my <ul></ul> tags, how come it does: "<li>Home</li>" "<li>Contact Us</li>" instead of "<li>Home</li>" "<li>Contact Us</li>" like a navigation?
-
After looking over this tutorial, I figured it all out and it was now imprinted into my brain: http://www.w3schools.com/css/tryit.asp?filename=trycss_link_advanced But, one thing that bothers me, how do I make it so it's not for ALL links? How do I make it so it's only for my navigation? http://www.w3schools.com/css/tryit.asp?filename=trycss_link_advanced
-
!!??!?!?!?!!??!?!?!?!???!?>@!??@?!?@?!#?@#?$@!#@!$%?@!?#!#?#$!@?$!#@?$!@#$?!@?$?@?????????????????????!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I am I trying to get the column box div.leftbottom under the other column box div.left, and the same for the div.rightbottom - get that under the column on the right. In the picture they are nearly side-by-side, when I want them under eachother.
-
What I thought. But what about my problem also?
-
Edit: If you have time, can you answer this question I have: I'm trying to become a good website designer, and I'm learning the ropes right now. Is it the "way of a designer" to use <br/> tags to help position stuff? Like with my problem (this topic), would it be professional to use multiple break tags just to get something under something else? I'm planning on releasing all of my designs I make in the future, open-source, and I was wondering if it would be good to have all the <br/> tags in their making things messy. ===================================================== ===================================================== Here is my style.css file: body { background-image:url(images/background.png); background-repeat:repeat-x; } a { color:#3399FF; text-decoration:none; } div.top { border:1px solid #0000CC; width:800px; background-color:#3399FF; border-bottom:hidden; } div.left { border:1px dotted black; border-top:hidden; border-left:hidden; padding:2px; text-align:left; float:left; width:120px; } div.bottomleft { border:1px dotted black; border-top:hidden; border-left:hidden; padding:2px; text-align:left; float:left; width:120px; } div.right { border:1px dotted black; border-top:hidden; border-right:hidden; padding:2px; text-align:left; float:right; width:120px; } div.bottomright { border:1px dotted black; border-top:hidden; border-right:hidden; padding:2px; text-align:left; float:right; width:120px; } div.container { text-align:left; width:500px; } div.content { text-align:left; background-color:white; width:800px; border:1px solid #0000CC; border-top:hidden; border-bottom:hidden; } div.footer { border:1px solid #0000CC; width:800px; text-align:center; background-color:white; } What we are looking at is div.right, div.bottomright, div.left, and div.bottomleft. My problem is that when I tried to add div.bottomright and div.bottomleft, they didn't go under their right place. Example: This is my actual index.php code: <div class="left">More content can go over here, on the left column. This is just centered by float:left; in the style.css file. Un-primary content usually goes here.</div><br/> <div class="bottomleft">More content can go over here, on the left column. This is just centered by float:left; in the style.css file. Un-primary content usually goes here.</div> <div class="right">More content can go over here, on the left column. This is just centered by float:left; in the style.css file. Un-primary content usually goes here.</div><br/> <div class="bottomright">More content can go over here, on the left column. This is just centered by float:left; in the style.css file. Un-primary content usually goes here.</div>
-
Here is the URL: http://srl.comoj.com/styles/
-
Edit: NVM, please delete this post.
-
Does anyone have any suggestions to improve my website theme?
-
Yes I do. I have something already built that tells me the next ID.
-
So basically, how would that work within my mysql_query string? Instead of $extract = mysql_query("SELECT * FROM photos WHERE photoid='$image'"); It would be $extract = mysql_query("SELECT * FROM photos WHERE ID > '$image' ORDER BY ASC"); ??? You sure that would work? And I could easily fix the last one.
-
But IT DOES bother me, and I worry about it. I have a image site, and this is what happens: (Example) Image one Image two Image three And a user clicks the "Next" button to change images. Say I delete image two and three, but I add three new images. It'll be: Image one Image four Image five Image six When an image doesn't exist, they get the error message that one doesn't exist. So a user will have to keep clicking next just to get to image four, because two and three were deleted.
-
(This is PhpMyAdmin) Why is it when I set a field like ID, (you know, the one that automatically updates itself if new values are added, like when a new user registers, they get their own id) and you delete one, the next ID always starts off as 1 above the one you deleted. Example: id name 1 John 2 Justin 3 Hailey 4 Madison Say if you delete Madison, and then insert "newvalue", it'll be: id name 1 John 2 Justin 3 Hailey 5 newvalue Why isn't it 4?
-
Thank you, it works.
-
$size = getimagesize($image.$extension); Why does the above code echo out: 6png instead of 6.png?
-
Yes, I want it so if the image >WIDTH< is bigger than the maximum dems, I want it to be resized. But I don't know how to get the width. How would I do that? Is getimagesize() only for width?
-
Is their a way, on my image uploading script, to set a maximum width? Not height, just width. Because on my page, the picture will keep sticking out if it's width is greater than the box it's in.