Jump to content

jwwceo

Members
  • Posts

    212
  • Joined

  • Last visited

Everything posted by jwwceo

  1. Hello, I am trying to use an include function to display a DIV from one server on another on wordpress blogs. it works great..except that some of the people trying to use the include use widgetized sidebars. The text inside the widgets do not read php, just text and html. I am wondering of there is another way to include the php file using just html, perhaps javascript. Thanks in advance!!! James
  2. I am not familiar with fopen?? how would this work???? James
  3. The only setting I can see is : allow_url_fopen and it is set to ON. Can anything else be causing this?? James
  4. Hello, I am trying to make a widget that bloggers can put in their sidebar with one line of code: the code is this: <?php include 'http://www.mysite.com/widget.php'; ?> I am testing this on my server, and I get the following error: Any ideas??? Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67 Warning: include(http://www.liquidcotton.com/widget.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67 Warning: include() [function.include]: Failed opening 'http://www.liquidcotton.com/widget.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/liquid/public_html/blog/wp-content/themes/so-simple-100/sidebar.php on line 67
  5. Hello, I have a query that organizes shirts by a set of criteria which changes based on what the customer clicks, either by score, alphabetical, date, etc. This works great. But if I have the shirts organized by score and lots of shirts have the same score, then it just seems to pull from the database in the order they were inserted, or by shirt_id. I would like to have some randomness insterted, so any shirt with the highest score, 1 can show up first. So basically, order first by my criteria, and then within that, by randomness. Here is my query so far: $data = mysql_query("SELECT * FROM shirts WHERE active='true' AND approved='1' ORDER BY $field $direction LIMIT $from, $max_results") or die(mysql_error());
  6. I have two places where valign is not working in IE, within TD's. Once I am trying to align a nested table to the top of a cell, and once I am trying to align an image to bottom of a cell. This seems so basic..it works great in FF. Any hacks for IE??? James
  7. hmm....I'm not sure I'm 100% clear....my apologies. The votes are just thumbs up (1) or thumbs down(0) and there is a table which stores every vote, with a user id, product_id and the vote. So I can use something like mysql_fetch_array(SELECT * FROM votes WHERE user_id ='123'); which will give me a big array of data of all that users votes.... but then how do I check each shirt against that...to determine whether to allow his to vote again...that is, how do I use a in_array on a multi-dimension array?? James
  8. Which function would I use to create the array?? The fields in the Vote table will be vote_id, user_id, product_id, and vote ( either 1 or 0) for yes or no???? This is where I am a little confused...as I need basically a big list of all the items they have already voted on to then use the in-array function on.
  9. I have a site where I am building a thumbs up/thumbs down voting system. I want users to only be allowed to vote once. So I am requiring that users be logged in to vote. I will then store their votes in the DB and retrieve this data when they return. If they have voted for an item, they will not be allowed to vote for it ever again. I am just wondering what the best way to approach this is. I will have their votes stored in the DB. How would I pull all of their votes out, (maybe in an array??) and then compare all the items with this list of "already voted on" items to see if they can vote, or to display their last votes. I guess I am uncertain which PHP functions to use...both to turn their votes into an array and also to see if a particular item ID is in that array or not. James
  10. The problem wasn't the expression at all. The data type in the DB was set to integer. And it needed to be float. Thanks guys for the help!! James
  11. $rating=($rs['up']/($rs['up']+$rs['down'])); Is there something wrong with this expression?? I'm just trying to get a simple ratio of up votes ( from DB) to total votes. I get only 1's or 0's as the result. best, James
  12. Then problem was the errors trying to be outputted for not using ' ' in the undefined constants. THANK YOU GUYS FOR THE HELP!!!
  13. I added the exit tag to look like this: header("Location: $newlink"); exit(); but I get the same error. headers already sent by (output started at /home/liquid/public_html/link.php:6) There is no white-space outside the php tags.
  14. I know header errors are usually caused by outputting before the header command....but I don't have any output...no includes....before the header command. I get an error saying headers already sent on line 6. Any ideas??? <?php error_reporting(E_ALL); mysql_connect ('localhost','xxxx', 'xx') or die("my sql error"); mysql_select_db ('lxxxxx'); if(isset($_GET[id])){ $shirtid = $_GET[id]; $sql="Select * from shirts Where shirt_id='$shirtid'"; $res=mysql_query($sql); $rs=mysql_fetch_assoc($res); $link=$rs[link]; $site_id=$rs[site_id]; if ($site_id == 6){ $newlink = "http://www.tshirthell.com/store/clicks.php?partner=jwwceo&page=".$link; } header("Location: $newlink"); } else { header("Location: index.php"); } ?>
  15. I have a database with country names in it. This populates a drop down. I would like the US to show up at the top of this list. How would I structure a query to ORDER BY "specific country id" AND THEN "alphabetic after that". Is this possible??? James
  16. i'm with you... sat down with it for a minute and realized that i was doing something stupid, corrected it, and now it works. Thanks for the help... it is much appreciated!
  17. Hello, the following table is driving me nuts...U get a i pixel gap between the rows in ALL browsers and I can't see why. I need the images to line up exactly. Have never seen this problem before. Any tips?? <table cellspacing='0' cellpadding='0' border='0' width='128' height='55'> <tr><td width='95' height='30'><img src='images/connector2.gif'></td> <td width='1' height='30'><img src='images/connector3.jpg' width='1' height='30'></td> <td width='32'height='30'><img src='images/blackdot.gif' width='32'></td> </tr> <tr><td width='95' height='25'><img src='images/blackdot.gif' width='25' width='95'></td> <td width='1' height='25'><img src='images/connector4.gif' height='25' width='1'></td> <td width='32'height='25'><img src='images/blackdot.gif' width='32' height='25'></td></tr> </table>
  18. I have a question which Im sure has an easy answer..at least I am thinking it does.. IS it possible to pass a variable upward?? For example, if I have a page with a header template, a content section, and then a footer; how would I use a variable that's in a content page, in the header. My specific problem is that I want to use custom title pages for my site. But the header is always the same. So I was thinking I can just put a title variable ( $title ) in my content section for each page. But how would I pass this info into the header. I realize I could also write if statements in the header, but how wold the header know which page is being used in the content?? Is there a function to grab the current URL? and then what if that URL is full of Get values?? Any tips would be awesome!! James
  19. I know I can pass in 4 variables, the text, the header, the subject, and the recepient. How do I send an attachment?? James
  20. Hello, I have a site that does not load correct in IE. I was wondering if somebody could take a look at it and make suggestions for how to make it look better in IE. JW
  21. well, I'm trying to open up a little window with a short survey that gets sent back to me... hence the open function, but for some reason it's not opening anything. Any thoughts?
  22. I have an expiration date field in a db that only needs the last 2 numbers of they year. like 07. How would I extract this from '2007'?? James
  23. Thanks btherl, that looks like exactly what I'm trying for... cant seem to get this silly onUnload function to work: <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF" background="/images/background.gif" onUnload="Open4('/stitching.php')"> ... i hate onunload
  24. I jsut posted a few minutes ago with a syntax error was getting. Now, when I insert the query, it works, but only about 2/3rds of my fields insert. The others don't. Does the order that I list the fields in my INSERT query, have to be same as the field order in the database?? This is seriously all I can think of. The data looks identical, but some is being inserted and some isn't. The last 1/3 just stays blank. JW
×
×
  • 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.