Jump to content

BillyBoB

Members
  • Posts

    630
  • Joined

  • Last visited

    Never

Everything posted by BillyBoB

  1. Just incase you can't get more than one item in this way its caused by your php... $cart_set1 = get_cart($cookie_id); $number=1; while($row = mysql_fetch_array($cart_set1)) {?> <form method="POST" action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/722419656118816"> <input type="hidden" name="<?php echo "item_name_".$number; ?>" value="<?php echo $row['product_name']; ?>"/> <input type="hidden" name="<?php echo "item_quantity_".$number; ?>" value="<?php echo $row['qty']; ?>"/> <input type="hidden" name="<?php echo "item_price_".$number; ?>" value="<?php echo $row['product_price']; ?>"/> <input type="hidden" name="<?php echo "item_currency_".$number; ?>" value="USD"/> <input type="hidden" name="<?php echo "ship_method_name_".$number; ?>" value="UPS Ground"/> <input type="hidden" name="<?php echo "ship_method_price_".$number; ?>" value="10.99"/> <input type="hidden" name="<?php echo "item_description_".$number; ?>" value="<?php echo $row['size']; ?>"/> <input type="hidden" name="tax_rate" value="0.0875"/> <input type="hidden" name="tax_us_state" value="NY"/> <input type="hidden" name="_charset_"/> <?php $number++; ?> <?php } ?> <input type="image" name="Google Checkout" alt="fast checkout through google" src="http://checkout.google.com/buttons/checkout.gif?merchant_id=722419656118816&w=180&h=46&style=white&variant=text&loc=en_US" height="46" width="180"/> </form>
  2. Can't modify message sorry for double posting. When I removed all php and renamed to .xhtml all error went away... http://dreamshowstudios.net/development/test/Home.xhtml
  3. http://validator.w3.org/check?uri=http%3A%2F%2Fsyckgamingleague.com%2FHome&charset=(detect+automatically)&doctype=Inline&group=0 All of my self closing tags are disapearing. Could someone help me I know I put them there in my php file. If you look at source on the actually page it shows them there. Also polkamon is codename we haven't come up with a name so don't ask.
  4. I just figured this out too. Lol. But the fields don't need to be if isset. Just the submit because the value = null. Sorry for wasting your time. Also figured out why IE was trying to download my script instead of read them. Its because the header. If you would like to read up on this because you too have the same error or ever do the link is: http://keystonewebsites.com/articles/mime_type.php
  5. My form is showing up right and supposedly it is getting inputs because when you press refresh it says resend. But it isn't checking form or letting login. <div id="login"> <form method="post"> <img src="../images/UserLogin.jpg" alt="User Login" /><br/> <div class="Login_Input"><img src="../images/Username.jpg" alt="Username" /><img src="../images/spacer.gif" alt=" " style="width: 10px; height: 1px;" /><input type="text" name="username" size="15" class="LOGINInput" /></div> <div class="Login_Input"><img src="../images/Password.jpg" alt="Password" /><img src="../images/spacer.gif" alt=" " style="width: 10px; height: 1px;" /><input type="password" name="password" size="15" class="LOGINInput" /></div> <div id="Login_ALeft"><input type="submit" name="submit" value="" id="LoginBtn" /> <a href="#">Forgot Password?</a></div> </form> <div id="Login_Register"> <?php if($_POST['submit']) { echo("I am the master"); if(!$_POST['username']||!$_POST['password']) { $error .= "One or more of the fields were left blank. "; }else{ $sql = mysql_query("SELECT `id` FROM `user_profiles` WHERE `username`='$_POST[username]'"); $info = mysql_fetch_array($sql); $loginuser = new User($info['id']); $loginuser->retrieveFiles(); if($loginuser->calculatePassword($_POST['username'], $_POST['password'])==1) { $_SESSION['id'] = $info['id']; $_SESSION['password'] = $loginuser->dbpassword; $error .= "You were logged in successfully. This page will redirect you in 3 seconds, if it doesn't click <a href=\"http://syckgamingleague.com/Home/\">here</a>.<meta http-equiv=\"Refresh\" content=\"3; url=http://syckgamingleague.com/Home/\" />"; }else{ $error .= "The username or password you entered was incorrect. "; } } } ?> <?php if($error) { echo $error; }else{?><a href="../Register/"><img src="../images/RegisterUp_btn.jpg" alt="Register an Account" id="RegisteranAccountImg" onmouseover="imgHover('RegisteranAccountImg','RegisterDown_btn.jpg');" onmouseout="imgHover('RegisteranAccountImg','RegisterUp_btn.jpg');" /></a><? } ?> </div> </div> sorry if it is a noob error haven't slept in over 24 hours. While you are in this article could anyone suggest why my webpage is coming up in Firefox but is trying to download in IE. I am using SEF URL's I think it has something to do with the hosting. .htaccess RewriteEngine on RewriteRule Validation/(.*)/(.*)/ Validation?username=$1&valkey=$2 DirectoryIndex Home <FilesMatch "^(Home|Register|Validation)$"> ForceType application/x-httpd-php </FilesMatch> The URL is: http://syckgamingleague.com/Home/
  6. Thanks a lot sorry about bothering you on such a nooby question its 7 am here and I haven't been to bed. So I am about to pass out just needed to get it done so I ask forum with infinite knowledge. Mostly because this forum is so big and has a lot of people lol.
  7. My problem is I have two tables with different information about the user but the id's need to be the same. I think there is a way of retrieving the last id from the query, but I don't know exactly. I have one query go then I want to have the id set by the first query for the second. I really want to do this for security so incase the id's get off somewhere somehow I do not have to go and manually fix 100's of user id's. My code is as follows: <?php $sql = "INSERT INTO `user_profiles` (`username`,`email`"; if($this->avatar) $sql .= ",`avatar`"; if($this->quote) $sql .= ",`quote`"; if($this->signature) $sql .= ",`signature`"; $sql .= ") VALUES('".$this->username."','".$this->email."'"; if($this->avatar) $sql .= ",'".$this->avatar."'"; if($this->quote) $sql .= ",'".$this->quote."'"; if($this->signature) $sql .= ",'".$this->signature."'"; $sql .= ")"; $query = mysql_query($sql); //retrieve id from this query //set it in this one. $validation = substr(sha1(rand()), rand(0,35), 5); $iplong = ip2long($_SERVER['REMOTE_ADDR']); $sql2 = "INSERT INTO `user_files` (`validated`,`userip`,`password`) VALUES('".$validation."','".$iplong."','".$this->password."')"; ?>
  8. Your script must be huge then because using 540 MB of ram then still needing 6 MB is ridiculous. Make sure you don't have a loop that is trying to continue to infinity. @PFMaBiSmAd: If you read my second post it explains that "Allowed memory size of 16777216 bytes exhausted" means that the allowed memory is already set to 16 GigaBytes I think he doesn't have a problem with the internal setting.
  9. Use my code you have an error in the beginning of your SQL query where it says tileCode = tileCode should be something like tileCode = '$tileCode'
  10. The error message told you that already.... 16777216/1024(megabytes)/1024(gigabytes) = 16 gb Which is a lot higher than 16 mb. But the problem is not within the php it is his hardware he doesn't have enough Randomly Accessed Memory(RAM) to run everything on his home computer plus the server applications. Thus he gets an error stating that he cannot allocate 8 mb of ram. Then do CTRL + ALT + DEL its the task manager. *CTRL + SHIFT + ESC is a shortcut for Vista users.
  11. differ8: He isn't being rude this is a public forum for people to work php problems out on if you want your problem solved then use the forum. Also use the forums correctly put your code inside [ code] brackets. thorpe is right you have your syntax all messed up. <?php $tileCode = $_POST["tileCode"]; $tileCategory = $_POST["tileCategory"]; $tileFactory = $_POST["tileFactory"]; $tileFinish = $_POST["tileFinish"]; $tileColour = $_POST["tileColour"]; $tileSize = $_POST["tileSize"]; $mysqli = new mysqli("localhost", "username", "password", "database"); $Tiles = "SELECT * FROM `tiles` WHERE `tileCode` = '$tileCode' "; if ($tileCode == "") {$Tiles .= "AND `tileCode` LIKE '%$tileCode%'";} if ($tileCategory == "") {$Tiles .= "AND `tileCategory` = '$tileCategory'";} ?> Dang got to it first... lol. But I want to get my first point across also you should use complete SQL syntax
  12. You are running out of Memory upgrade your computer. If you want to check this info press CTRL+SHIFT+ESC and goto Performance Tab tell us what it says under Physical Memory ... all values.
  13. If you are in a while loop then try something like this. <?php while($blah = $blah) { $dot = ''; if(strlen($row["CompanyName"])>25) { $dot = '...';} echo substr($row["CompanyName"],0,25).$dot."</a></td>\n"; } ?>
  14. Get a better host. You are running out of memory.
  15. http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=Backup+mysql+database+with+php&btnG=Google+Search Google, it works....
  16. Make sure to use proper XML and you can always use http://www.php.net/manual/en/ref.domxml.php PHP DomDocument
  17. I would suggest something like: $query = mysql_query("SELECT * FROM table"); while ($row_rs_artikler = mysql_fetch_array($query)) { if($bLeft == 1) { $LeftHTML .= '<tr><td>'; if (($row_rs_artikler['filename']) != "") { $LeftHTML .= '<img src="images/articleimages/'.$row_rs_artikler['filename'].'" alt="'.$row_rs_artikler['imagedescription'].'" class="image" /><br /><br />'; } $LeftHTML .= $row_rs_artikler['description'].'<br /><br ></td></tr>'; $bLeft = 0; } else { $RightHTML .= '<tr><td>'; if (($row_rs_artikler['filename']) != "") { $RightHTML .= '<img src="images/articleimages/'.$row_rs_artikler['filename'].'" alt="'.$row_rs_artikler['imagedescription'].'" class="image" /><br /><br />'; } $RightHTML .= $row_rs_artikler['description'].'<br /><br /></td></tr>'; $bLeft = 1; } } ?> I don't know exactly how you have done the rest of your code because this is clearly not all of it.
  18. Check the edit sorry for the error.
  19. Something like this might work. $fieldanimal = array('dog', 'cat', 'mouse', 'bird'); if(in_array('dog', $fieldanimal)) { // Profit??? }
  20. You really shouldn't send headers out after the Head section of the html but if you must put ob_start(); in php tags at the very top of the page. Also this is a stickied problem. You should look at those before coming for help.
  21. Try this out. if (!preg_match("/[\w\s-]*/i", $_POST[first] )) { $_SESSION['errors'].= "*Your name must be alphabetic" . "<br>"; } I don't know if ereg will work but I'm pretty sure that preg will. Try it and come back to me. Sorry about the error hope you get this edit please edit your reply if you do.
  22. The problem with using the positive lookbehind is what if they don't start with a bbcode tag? Example: Hi [ table] [ tr] [ td] info here Hi [ /td] [ /tr] [ /table] http://dreamshowstudios.net/development/BBCode/test.php Is where I tested it as you can see it messes up.
  23. Alright the reasoning for the confusion is that the input data is going to be unexpected. Because the user is the one to place in the data. Example Data: [ code] <?php echo \$string; ?> [ /code] Without the spaces of course this is the data that gave me the unexpected outcome. Actually I take back there being any html tags all should be bbcode tags. The problem I have is if somebody use a lot of tags and spaces them out with line breaks I don't want them to appear if it is in he front of the message. Example: [ table] [ tr] [ td] info here [ b]Hi[ /b] [ /td] [ /tr] [ /table] This will display something like: info here Hi
×
×
  • 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.