Jump to content

Jewbilee

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Posts posted by Jewbilee

  1. Hey everyone,

     

    I'm availible to do some PHP/MySQL/HTML/CSS work for your site.  I have extensive background in all of the mentioned environment and will work with you to make sure the final product is exactly how you want it.

     

    www.pwncaeks.com is currently my largest project.  I have written the entire CMS, as well as user management, layout, and coding.

     

    Please feel free to contact me with your projects and I will get back to you within a few hours as I check my email hourly.

     

    jewbilee @ gmail dot com

     

    Thanks and have a great day!

    -Ian

     

  2. you would need to echo both the HTML and PHP... make sure that when you echo the HTML, that you've properly formatted it by escaping the quotes and everything.  I've never done it myself, but i dont see why it wouldn't work.

  3. Skunk, that isnt what hes asking.

     

    Hodo, what you're trying to use is $_GET functions.

     

    When you have a url such as: http://www.myspace.com/myfile.php?userid=10

    it is possible to retrieve "userid"'s value using a the $_GET function.

     

    in the myfile.php code, you would have something like this: $userid = $_GET['userid'];

    That takes the value for userid from the url and assigns it to a new variable.  (Note: the variable names can be whatever you want).

     

    You would then use this to load whatever info you want.

  4. I have a code that for some reason is not working.  I've printed out the sql error and it just says there's an error... nothing specific.

     

    The problem is with $query1.  Its saying theres an error but ive run the query in PHPMyAdmin and it works fine.  Any suggestions?

    <?php
    include("layout_1.txt");
    include("connect.php");
    
    $id = $_GET['id'];
    
    if(!empty($id))
    {
        $query = "SELECT * FROM camprentals WHERE id=$id";
        $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
        $query1 = "SELECT * FROM rentalsgal";
        $result1 = mysql_query(query1) or die ("Error in query: $query1. ".mysql_error());
    
    while($row = mysql_fetch_object($result))
    {
        echo "<center><font size=5>$row->title</font><br><br>";
    
        $imgs = explode(" ", $row->imgs);
        echo "<table border=0 cellspacing=10>";
        $count = 1;
        foreach($imgs as $value)
        {
    $found = false;
    
    while($row1 = mysql_fetch_object($result1))
    {
                if($value == $row1->name)
        {
            $found = true;
        }
    }
    if($found){
            if($count == 1)
            {
                echo "<tr><td>";
            }
            else
            {
                echo "<td>";
            }
            echo "<a href=\"gallery/rentals/".$value.".jpg\"><img src=\"gallery/rentals/".$value."_thumb.jpg\" border=0></a>";
            if($count == 5)
            {
                echo "</td></tr>";
            }
            else
            {
                echo "</td>";
            }
            $count++;
    }
        }
        echo "</table>";
        echo $row->desc;
    }  
    }
    else
    {
        $query = "SELECT * FROM camprentals";
        $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
        
        echo "<table border=0>";
        while($row = mysql_fetch_object($result))
        {
    
        $desc = substr($row->desc, 0, 150);
            echo "<tr><td width=\"110\"><img src=\"gallery/rentals/".$row->mainimg."_thumb.jpg\"></td>
                  <td><font size=5><a href=\"rentals.php?id=$row->id\">$row->title</a>
                  </font><br>".$desc."...</td></tr>";
        }
        echo "</table>";
    }
    include("layout_2.txt");
    ?>
    

  5. heres the problem with the above parts.. since one field is named user_id and the other is friend.. what if i wanted to display friend's friends and not user_id's...

    like..

    say:

    bob & fred
    bod & burt
    burt & fred..

    you see?  How would i display all of burts friends?
  6. Im having a little trouble with this.  I need a way to keep track of friends of users similar to myspace.  One user can add several others to a friends list and be viewed and removed and what not.  The only problem Im having is how to do I store this in a database?  Should I make a seperate table or store the id's of friends in a users table?
  7. Every time i try to submit the following code.. i get a 403 error..  I turned register_globals on but I can't figure out whats wrong..

    [code]<?php

    if (!isset($_POST['submit'])) {
    // form not submitted
    ?>
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
    <input type="submit" name="submit" value="Test"></form>
    <?php
    }
    else { include('testdb.php'); } ?>[/code]

    i get this error:

    Forbidden

    You don't have permission to access /< on this server.
×
×
  • 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.