Jump to content

zavin

Members
  • Posts

    40
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zavin's Achievements

Member

Member (2/5)

0

Reputation

  1. Makes perfect since. Didn't think about that, thanks.
  2. Why does this code only display 1 result? If I PRINT $row3 all results diplay, but the variable will only give 1 result. It would be easier for me to just PRINT row3, but I have 13 rows with different loops. $sql = "SELECT * FROM $city WHERE SG_Name='$sg GROUP BY ID'"; $result = mysql_query($sql); while ($row = mysql_fetch_row($result)) { $ID="{$row[3]}"; } print "<tr border='1'> <td>".$Source_ID."</td> </tr>";
  3. I think $source = file_get_contents('http://site.to.fetch.from/'); will work for me, but I'm also going to look into simplehtmldom a little more. The first problem I have is that the site I'm trying to get info from requires a log in and of course when I try to log in it looks for the log in page for the site on my server. Is there a work around for this?
  4. QuickOldCar - Thanks I'm going to start studying up on cURL to see if it's what I need. johnny86 - I'm wanting to extract information. For example if a web page had a list of prices and I wanted my page to list some of those prices based on the item from that page I want to list. I hope that makes since.
  5. Is it possible to write a php script that would extract data from an external web page. I've been working with php for a few years as a hobby, but I've never seen this done or needed a reason to until now. Thanks in advance for any responses.
  6. $item displays a table of data retrieved from a data base it loops until every item is displayed on the page. The problem is that displays 20 items from left to right, but you can only see 5 of them in the browser. I need it to wrap to the next line after each set of 5 items displayed.
  7. Who can I make an echoed table wrap or break after displaying 4 or 5 items. The code below will display $item from left to right like I need it, but I need it to break to the next line after it the first 4 or 5 item. Any help would be appreciated. $item = "<td width='25%' align='center'> <img src='". $worked2['image']."' width='100' height='100' style='border: 1px solid #333333'><br> ". item_popup($worked2['itemname'], $worked2['id']) ." [x".$line['quantity']."]<br> $". $worked2['cost'] ."</td> <td>"; echo $item; "</td>";
  8. I have a form listed below that you can currently select 1 of 3 values. I want to be able to use all 3 values at once. Once the submit button is hit the form need to ad the total of the 3 values to verify that it is greater than 0 and less than $value_ available. I also need the 3 values submitted separately so they can e inserted into their respective data bases. I sure I'm just over thinking the solution. Any help would be appreciated. <form method='post'> You can currently use <?php echo $value_available; ?> value. <input type='text' name='energy' value='0' size='5' maxlength='5'> <select name='type'> <option value='1'>Value 1</option> <option value='2'>Value 2</option> <option value='3'>Value 3</option> </select> <input type='submit' name='value' value='Use Value'> </form>
  9. That was it. It's always the small stuff thanks.
  10. Why is cars in the following code an undefined variable? $result = mysql_query("SELECT * FROM `carlot`"); $howmanyitems = 0; while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($line['buyable'] == 1){ $cars .= "<td width='25%' align='center'><img src='". $line['image']."' width='100' height='100' style='border: 1px solid #333333'><br> ". car_popup($line['name'], $line['id']) ."<br>$". $line['cost'] ."<br><a href='carlot.php?buy=".$line['id']."'>[buy]</a></td>"; $howmanyitems = $howmanyitems + 1; if ($howmanyitems == 3){ $cars.= "</tr><tr>"; $howmanyitems = 0; } } }
  11. I have always written my code and design in the same php file. All of my previous jobs have been small and did not have a need for a designer. Now I have a project that will require a designer to handle the layout and me to handle the coding. Does anyone have a good reference for a tutorial that I can use to help me divide the design portion from the code portion of my project. I am not looking for a script to do it for me, I am looking for a good example that will help me understand the right way to get started. Any help is appreciated.
  12. The include is in the header. None of the page are accessed directly they are all accessed from the header.
  13. I have a page that I want to include in all pages except one. I have the included page in my header so that it is included on every page. Is there something that I can put on the one page that I don't want it included on so that it does not show up.
  14. Is there a script that can do what I'm looking for? If so what would I search for.
  15. Is it possible to write a script that will search a website and add the results to my sites data base?
×
×
  • 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.