Re: Hello

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't quite understand what your problem is but it looks as if some fields
of the records that show up in phpMySql are empty and that the result page
that you have built does not show them. If that is the case, is there a
where clasue that causes them to not return?

Can you run the query that is on your result page in phpmysql and see what
it returns.


Jack

2009/12/14 Karl DeSaulniers <karl@xxxxxxxxxxxxxxx>

> Hi I am new to this list.
> I am in need of some help or direction.
> I am new to php and databases, so forgive me if my request seems too
> simple.
>
> I am making a database if users and have had much success in getting it to
> work however, not all my data is getting shown once I try to display
> results. I am running an INSERT query that inputs data into the database
> from a form. But here is the hiccup. I am asigning the form data to a
> $variable.
>
> Eg:  $Username = $_POST['Username'];
>
> I then run $Username through some checks to make sure it's not an
> injection. After all that I want to insert it into the database. This works
> fine if I use:
>
> $query = "INSERT INTO users (Username, UserEmail, etc)
>
> VALUES ('".$_POST['Username']."', '".$_POST['UserEmail']."', etc)";
>
> And it works if I use
>
> VALUES ('".$Username."', '".$UserEmail."', etc)";
>
> However I have some variables that are not posted from the form and in the
> first example, it does not insert those in the database.
>
> In the second, it will insert them into the database, but when I go to
> display them it is saying there are no records to retrieve. ???? I looked at
> the database in phpMySql and they are there. It will only display them in
> the results page if they had been inserted using $_POST. Is this normal?
> What is the best way to $_POST a $Variable. Something like
> $_POST[$Username] (which doesn't work).
>
> Any help would be greatly appreciated.
> Thanks,
>
> Karl
> Design Drumm
>
> Sent from losPhone
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Jack van Zanen

-------------------------
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient. If you are not the intended recipient,
please be aware that any disclosure, copying, distribution or use of this
e-mail or any attachment is prohibited. If you have received this e-mail in
error, please contact the sender and delete all copies.
Thank you for your cooperation

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux