Jump to content

jj72ny

Members
  • Posts

    33
  • Joined

  • Last visited

jj72ny's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I have been recruted by my church to try to build a form that will take info from a external websight one they dont own and place it in to a form that can be added to and sent to the church email the info is in the url how ever i am not shore if and how to extract it to a form the church helps needy people out and would like a way for some one to go to there websight and search say walmart for there needs and then take that description that is in the url and pass it to an email to them in turn a comity buys the item for them (well if its a need they will
  2. IP address is correct it is supose to keep people from rating more than once
  3. And to loop throughfor ($i=1; $i<=10; $i++)Where $i=1 is the times it should loop Not shore what the other numbers are I see them on w3 but really don't understand what they do
  4. Ok so file('ratings.txt');Because I believe that ratings.txt So this should open the file correct?
  5. After some research I found out that this dose not go through a data base info is saved in a txt file witch I have been trying to figure out it still can't be that hard it's right there in the php I just don't know what line or lines it is the program dose it just need to reverse it
  6. Aparently I have misunderstood the concept of this blog I thought it was for help and to learn and learning is what I am trying to do so if its not to much to ask for you to explain your answer
  7. When I open my page I want to put this on instead of it going to the pull down then submit I would like it to go directly to the result page and a button to take you to the rate button Ie Open a book title page and see what other people have rated it then if you have read the book you also can rate it then see the results
  8. lol thought i did <?php/************************************************* * Micro Rate * * Version: 1.0 * Date: 2007-07-17 * ****************************************************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"><html><head> <title>Micro Rate</title> <link href="style/style.css" rel="stylesheet" type="text/css" /></head><body> <div id="main"> <div id="caption">Micro Rate</div> <div id="icon"> </div> <?php if ( (!isset($_POST['submit'])) ) { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table width="100%"> <tr><td>Your rating:</td><td><select name="rate"> <?php for ($i = 1; $i <= 10; $i++) { echo "<option value="$i">$i</option>"; } ?> </select></td></tr> <tr><td colspan="2" align="center"><input type="submit" value="Rate it!" name="submit"/></td></tr> </table> </form> <?php } else { $rate = isset ($_POST['rate']) ? $_POST['rate'] : 0; $filename = "ratings"; $alreadyRated = false; $totalRates = 0; $totalPoints = 0; $ip = getenv('REMOTE_ADDR'); $oldResults = file('results/'.$filename.'.txt'); foreach ($oldResults as $value) { $oneRate = explode(':',$value); if ($ip == $oneRate[0]) $alreadyRated = true; $totalRates++; $totalPoints += $oneRate[1]; } if ((!$alreadyRated) && ($rate > 0)){ $f = fopen('results/'.$filename.".txt","a+"); fwrite($f,$ip.':'.$rate."n"); fclose($f); $totalRates++; $totalPoints+=$rate; } ?> <div id="result"> <?php echo "Actual rating from $totalRates rates is: ".substr(($totalPoints/$totalRates),0,3)."<br/>"; for ($i=0;$i<round(($totalPoints/$totalRates),0);$i++){ echo "<img src='style/star.png' alt='s' />"; }echo "</div>"; } ?> <div id="source">Micro Rate 1.0</div> </div>
  9. I am playing around with this script and can't figure out how to show just the results on a page Micro Rate Micro Rate
  10. jj72ny

    include problem

    Ok so I tryed that didn't work everything shows up behind the original content I cut copied and past exactly what you put on board thinking I was missing something and still nothing I just got to thinking there is a ton of pages to this editor maybe it should go in another one I just figured that the editor.html was the one I don't know I guess it's realy not that important to do this just as long as visitors are not acualy leaving my page it may be fine
  11. jj72ny

    include problem

    Everything is in the same folder not in any sub folders
  12. jj72ny

    include problem

    hello all,I am trying to put a include into google svg editor just put a link back to my homepage and maybe a logothis is what i am puting in <div class="leftmenu"> <?php include 'test.php'; ?> </div> cence i do not have a lot of experiance i am unshore where to put it I was trying a hit and miss but every where i put it it would show up behind the same content already therewhere do i put it?am i in the right file? this is the svg editor page<!-- removed for now, causes problems in Firefox: manifest="svg-editor.manifest" --><head><meta http-equiv="Content-type" content="text/html;charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="chrome=1"/><meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;"/><meta name="apple-mobile-web-app-capable" content="yes"/><link rel="icon" type="image/png" href="images/logo.png"/><link rel="stylesheet" href="jgraduate/css/jPicker.css" type="text/css"/><link rel="stylesheet" href="jgraduate/css/jgraduate.css" type="text/css"/><link rel="stylesheet" href="svg-editor.css" type="text/css"/><link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/><!--{if jquery_release}> <script type="text/javascript" src="
  13. From out side the program
  14. Ok so now how can I make that change with a button or a link from my menu bar
×
×
  • Create New...