Staredit Network > Forums > Technology & Computers > Topic: PHP Ongoing Assistance
PHP Ongoing Assistance
Mar 9 2008, 4:20 pm
By: InsolubleFluff
Pages: < 1 « 4 5 6
 

Mar 27 2008, 9:10 pm Centreri Post #101

Relatively ancient and inactive

Err... I had just copy/pasted from my old register script. If by changes you mean my 'suggestions', upload it again, and I think it shouldn't be hard to find the problem.

The way I always connect to MySQL is by setting the mysql_connect() to a variable, the query to a variable, etc. For example, I'm not sure you can just do mysql_query without first specifying which connection you're doing it for - after all, you can be connected to more then one db at a time. Also, as I had said before, where's your mysql_connect()? Maybe the problems are because you didn't actually connect to MySQL.



None.

Mar 27 2008, 9:37 pm NexY Post #102



Thank You IP.

@Centreri: My mysql connect is in another file called connect.php. I have require("connect.php"); at the start of my script. In connect.php i have a variable called $con which has all the connection info. What I posted is only part of the code. Am I suppose to put $con everytime I wanna do a query, because if I eliminate some of the code without having $con, it adds the stuff into the database. But I want the script to be more thorough, which is where i'm running problems as you see.



None.

Mar 27 2008, 9:44 pm Centreri Post #103

Relatively ancient and inactive

Code
$registerBasicDataExecute = mysql_query($registerBasicData, $registerConnect);

I'm pretty sure that mysql_query requires you to select the connection, which in my script is $registerConnect. That might be your problem there. Same thing with selecting the database - you should specify the connection. I know that both functions should work even without specifying, but i can't really see anything else wrong with your mysql_select_db.



None.

Mar 28 2008, 3:14 am NexY Post #104



Well, when I posted the error about mysql_select_db, I had $con after selecting it. So adding $con might be the problem, if I take it out I get the error mentioned before that.



None.

Mar 30 2008, 2:34 pm InsolubleFluff Post #105



so I am updating some pictures for the site's layout right, and for no reason, unlike it used to, the gradient in the background is half below another image and half above it...

The only code relevant to this is:

Code
body
{
background-image: url('/images/tile2.png');
background-position: top left;
margin:0px;
}
center
{
background-image: url('/images/gradient1.png');
background-position: top left;
background-repeat: repeat-x;
}

and
Code
<body>
<center>
<table border='0' width='800px' height='150px' cellspacing="0" cellpadding="0">
<tr>
<td style="height:150px" width='550px' background="images/header.png"></td>
<td style="height:150px" width='250px' background="images/login1.png"><?php require("login.php"); ?></td>
</tr>
</table>


any idea's why the gradient is half below the login1.png and half above it?



None.

Mar 30 2008, 2:36 pm Centreri Post #106

Relatively ancient and inactive

Err.. pics? I don't really understand what you're saying.



None.

Mar 31 2008, 3:48 am InsolubleFluff Post #107



http://img134.imageshack.us/my.php?image=lawlzrzrzrzbv3.jpg

there is a top strip which seems somewhat correct, it is blending with the rest, then all of a sudden the gradient comes to the front and it makes the login box look dirty and not match the top or bottom parts (before it hits the little navbar thing)



None.

Mar 31 2008, 3:58 am InsolubleFluff Post #108



fixed



None.

Apr 2 2008, 3:44 am InsolubleFluff Post #109



HALP CSS!

I want this text to do as it's told and the image too...

so, in the html part of the code I have

Code
<a href="site.php"><img src="images/abc.png" /></a>


now the link works perfectly, it's just the image now has one of those ugly ass borders, so in the css file I have

Code
a
{
hover {text-decoration:'none';
link {text-decoration:'none';
visited {text-decoration:'none';
}


How can I make it so the image has no purple border, indicating that it's been visited and no other kinds of borders so it's JUST the image that links to a page... would be appreciated if there was any alternatives to using an image as a hyperlink



None.

Apr 2 2008, 4:07 am DT_Battlekruser Post #110



border:none; ?



None.

Apr 2 2008, 5:12 pm Forsaken Archer Post #111



a:hover, a:visited, a:active {text-decoration:none;}

I dunno if a:link is valid.



None.

Apr 2 2008, 8:26 pm (U)Bolt_Head Post #112



So I made a tree view type thing using php.

I'm proud of this cause i did use any referances and came up with it by myself. Except for looking up php function to convert a number to binary and to take the power of one. The idea is to have many different potential views of a page but only to use one view variable to define them all. I used a number that i broke down into binary then used each bit to represent independent views.

In the tree view implementation there is a list of several categories. You can view each category by clicking on the category name. Doing this will show the contents of that category without compressing the other categories. Also if you click on the category and it is being viewed then it will be compressed.

Here is my code.
Code
<?php

    $view = $_GET['view'];
    $viewbinary = decbin($view);
    $length = strlen($viewbinary);

    function linkview($x)
    {
        global $view;     global $viewbinary;         global $length;
        $linkvalue = pow(2,($x-1));

        if($viewbinary{($length - $x)} == 1)
            echo ($view - $linkvalue);
        else
            echo ($view + $linkvalue);
    }
?>

    <a href='?view=<?php linkview(1); ?>'>Item 1</a><br>
    <?php if($viewbinary{($length - 1)} == 1) echo"
    Item 1 - PartA<br>
    Item 1 - PartB<br>
    Item 1 - PartC<br>
    "; ?>

    <a href='?view=<?php linkview(2); ?>'>Item 2</a><br>
    <?php if($viewbinary{($length - 2)} == 1) echo"
    Item 2 - PartA<br>
    Item 2 - PartB<br>
    Item 2 - PartC<br>
    "; ?>

    <a href='?view=<?php linkview(3); ?>'>Item 3</a><br>
    <?php if($viewbinary{($length - 3)} == 1) echo"
    Item 3 - PartA<br>
    Item 3 - PartB<br>
    Item 3 - PartC<br>
    "; ?>

    <a href='?view=<?php linkview(4); ?>'>Item 4</a><br>
    <?php if($viewbinary{($length - 4)} == 1) echo"
    Item 4 - PartA<br>
    Item 4 - PartB<br>
    Item 4 - PartC<br>
    "; ?>


So what do you think?



None.

Apr 2 2008, 10:08 pm Forsaken Archer Post #113



Quote from name:BoltHead
So what do you think?
Interesting, but I wouldn't see myself using it. I like it though.



None.

Apr 2 2008, 10:20 pm (U)Bolt_Head Post #114



Quote from name:isolatedpurity
Quote from name:BoltHead
So what do you think?
Interesting, but I wouldn't see myself using it. I like it though.

I have found one problem with it... I don't know if you consider it a problem though.
If I'm using it for a tree view type structure. Then sub directories are not compressed if there parent is. Depends on how your using it i guess.



None.

Options
Pages: < 1 « 4 5 6
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
Please log in to shout.


Members Online: Oh_Man