Jump to content

basicxman

Members
  • Posts

    20
  • Joined

  • Last visited

Previous Fields

  • Languages
    CSS, HTML, XHTML, JavaScript

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    On my laptop!
  • Interests
    Programming,<br />Building robots<br />electronics<br />computers<br />FIRST

basicxman's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. if you're using free accounts some dont allow custom CSS (I don't know why) so you might want to switch hosting services. Just my $0.02
  2. Now I have the feeling this is something completely obvious and I'm going to kick myself for not knowing this but here goes:echo '<form action="rate.php" method="post">';echo "<input type='hidden' name='title' value='$a' />";echo '<input type="radio" name="yes" value="agree" checked="checked" />Agree <br /><input type="radio" name="no" value="disagree" />Disagree';echo '<input type="submit" value="Submit" />';echo '</form>';that code works perfectly except for one problem, both radio buttons can be clicked at the same time...any idea on how to fix? is it the fact that I'm using echo to generate the radio buttons?thanks in advanced
  3. yes i have a loop that access the table and basically just does echo title echo date echo news and then finally ill have echo form
  4. thanks for your help everyone, to answer some questions:the news will not all be on one page, just said that to make the post easier i will be using sessions to stop more than one votei am stopping news with the same title as it's 'news' there shoudnt be a duplicatei will be most likely using the hidden input form way of doing things as i had thought of a rough way of doing that before but thanks you guys I now fully know-howthanks again for all your help
  5. wonderful. one thing though, how do i read those variables, are they treated like action.php?x=$ROW['title']then:$y = $x$x being from the title?
  6. or can i send data with the action URL? like in a form with two buttons, action="submitrating.php?x=$ROW['title']" would that work?
  7. Technically the site is for robotics enthusaists. People can post news, it goes through an admin queue but then I had the thought->what if the news is false? So I decided on other users being able to rate the news are true or false,enough false votes and the news goes down (i can do that manually or through a script doesnt matter to me)the news page lists every approved news record in the table of the databasei need the PHP script to generate the javascript code based on the title of the news though, i guess i could do some javascriptwhen you say 1316 could i use a PHP variable insetead like $ROW['title']? thats the only way i see this working because the PHP script has to generate the code automaticallyAJAX is not *required* because i do not need it to load on the same page, im 14 years old so I might integrate that later when my web dev techniques have improved and at least when the sites done
  8. could i do this?<?=$_SERVER['PHP_SELF']; $x=$title?>
  9. OK, here's the run down. I have a database that contains a news table. Each record of the news table has title, and news, and points (plus date, time, approval but they are irrelevant to my question)I've made a PHP script to list all the news records on a page and each record is shown 'Title, submitted on date' then <br /> and it shows the news.What I want to do though is have two buttons, a true/like and then a false/dislike button. When you click the true button it adds a point and then when you click the false button it subtracts a point. So I was going to add a form with the two buttons in an echo and place it beside each recordthe forms action would be <?=$_SERVER['PHP_SELF'];?> and a script on the same page would use if(isset...) on each button and then execute the MySql command(s) and set cookies so the same user cannot choose againalthough the thing is, I need to know which record of news im setting points for, how can i do this? i.e. if a user clicks true beside the news entitled 'Robot saves life' I need to add a point to the 'Robot saves life' entry and not another one on the page.
  10. OK, here's the run down. I have a database that contains a news table. Each record of the news table has title, and news, and points (plus date, time, approval but they are irrelevant to my question)I've made a PHP script to list all the news records on a page and each record is shown 'Title, submitted on date' then <br /> and it shows the news.What I want to do though is have two buttons, a true/like and then a false/dislike button. When you click the true button it adds a point and then when you click the false button it subtracts a point. So I was going to add a form with the two buttons in an echo and place it beside each recordthe forms action would be <?=$_SERVER['PHP_SELF'];?> and a script on the same page would use if(isset...) on each button and then execute the MySql command(s) and set cookies so the same user cannot choose againalthough the thing is, I need to know which record of news im setting points for, how can i do this? i.e. if a user clicks true beside the news entitled 'Robot saves life' I need to add a point to the 'Robot saves life' entry and not another one on the page.
  11. Thank you, this worked...that seems like a weird error. About the I'm not exactly sure why it's there I use the built in code editor in Bluehost and it was there when i opened it last
  12. wait...this works in IE...wow what are the chances...anybody know an FF alternative to float?
  13. the HTML is: <div id="container"><div id="holder"><div id="navbar"></div><div id="header"></div><div id="content"></div><div id="sidebar"></div></div></div> the header and navbar center at the top with the header below the navbar right as i want it perfectlythe CSS code is: div#holder {top:0px;margin: 0 auto;width:800px;text-align:left;}div#navbar {position:relative; top:0px;width:800px;height:30px;background-image:url('../webbar.gif');text-align:center;}div#header {position:relative;top:0px;margin:0 auto;width:800px;height:150px;text-align:center;background-image:url('../truheader.gif');margin-bottom:0px;}div#content {margin-top:0px;top:0px;left:0px;width:600px;height:400px;text-align:left;background-color:#ffffff;padding:1px;float:left;}div#sidebar {margin-top:0px;top:0px;left:600px;width:200px;height:600px;background-color:#666666;float:right;}div#container {top:0px;left:0px;width:100%;text-align:center;} ive tried so many different things and nothing works
  14. Quick question:How do I take two relative positioned div's and put them side by side? Both are in a holder div which uses margin:0 auto; to center it's self inside a container (container being the entire screen)i was thinking of using one div and tables but i didnt like how it came outplease reply asap, thanks in advance everyone!
×
×
  • Create New...