Search found 31 matches

by pugs421
Fri Aug 01, 2003 8:47 am
Forum: PHP coding => General
Topic: admin sets prices. no commas
Replies: 1
Views: 619

admin sets prices. no commas

When the prices are entered I will suggest the correct format next to the text box. ex. 150000. But if the user enters a comma it messes up the entry. How do I ensure that the prices can be entered correctly without a user making an error? Would I somehow remove the comma if the user entered one in,...
by pugs421
Fri Aug 01, 2003 8:43 am
Forum: PHP coding => General
Topic: wildcard in where part of sql statement?
Replies: 3
Views: 885

Unfortunatly i have no idea what your talking about so since it works, i guess I'm ok with that.
by pugs421
Fri Aug 01, 2003 6:22 am
Forum: PHP coding => General
Topic: wildcard in where part of sql statement?
Replies: 3
Views: 885

There must be a better way than the way I made this work. If a user selects 'any' from the drop down menu for number of bedrooms, the value assigned is zero. Then I have 2 seperate queries with a conditional statement deciding which one to use. I'm pretty new to this stuff and even though I got it t...
by pugs421
Fri Aug 01, 2003 5:50 am
Forum: PHP coding => General
Topic: wildcard in where part of sql statement?
Replies: 3
Views: 885

wildcard in where part of sql statement?

Searching for home listings with multiple critera. I'm trying to make a search feature that allows user to select the town, price range, and number of bedrooms in a home and return the results. Everything works except that I have to allow the user to choose 'any' from the drop down list for the bedr...
by pugs421
Sun Jul 13, 2003 1:27 pm
Forum: PHP coding => General
Topic: How specific can I ORDER BY
Replies: 3
Views: 968

I actually went with liquedus's suggestion. I'm a novice and it was a little easier for me to grasp. I used a case switch statment to assign a number to a value based on what rank the user is. switch ($HTTP_POST_VARS['rank']) { case 'General': $HTTP_POST_VARS['rankvalue'] = 1; break; case 'First Cla...
by pugs421
Sun Jul 13, 2003 12:50 pm
Forum: PHP coding => General
Topic: create a back button. Would user info still be there?
Replies: 3
Views: 978

oh. I can just do it with javascript huh? I know they could hit the back button but I figured it would be more user friendly to provide one. I'll give that a try. thanks.
by pugs421
Sun Jul 13, 2003 12:20 pm
Forum: PHP coding => General
Topic: create a back button. Would user info still be there?
Replies: 3
Views: 978

create a back button. Would user info still be there?

I know there are ways to resubmit the user info but I'm a novice and I can only do so much. As of now my form vaildation will display ex. "You must fill in your address" on a seperate page. If I somehow make a back button on that page using php will the info the user filled into the form stay there?...
by pugs421
Sun Jul 13, 2003 9:58 am
Forum: PHP coding => General
Topic: check if username exists
Replies: 2
Views: 904

check if username exists

I did this by using code like this after running a query to select where user_name is equal to the entered value.: if ($totalRows >= 1) { echo "that name already exisits"; exit; } If the username exists, it displays this message on a blank white page. Is there a way to display it on the page that th...
by pugs421
Sat Jul 12, 2003 3:36 pm
Forum: PHP coding => General
Topic: I'm losing the file extension (.jpeg)
Replies: 1
Views: 567

Nevermind. I was able to go about it a different way.
by pugs421
Sat Jul 12, 2003 10:14 am
Forum: PHP coding => General
Topic: I'm losing the file extension (.jpeg)
Replies: 1
Views: 567

I'm losing the file extension (.jpeg)

A user uploads a picture and the image name is stored in the database. when they want to update their info, the modify page places the filename from the database in a hidden field. If the new file upload field is null, the filename in the hidden field should be reinserted into the database.(If they ...
by pugs421
Fri Jul 11, 2003 8:46 am
Forum: PHP coding => General
Topic: How specific can I ORDER BY
Replies: 3
Views: 968

How specific can I ORDER BY

I have a member list where each member has a rank. General, Captain, Private, etc.. Can I actually specify the order they will be listed by, or is the ORDER BY limited to asc, desc?
by pugs421
Mon Jul 07, 2003 7:51 pm
Forum: PHP coding => General
Topic: allowing null file field in this script
Replies: 6
Views: 1603

I went back to the books and I still dont know what you mean by skip. Is this done with a conditional statement?
by pugs421
Mon Jul 07, 2003 10:29 am
Forum: PHP coding => General
Topic: allowing null file field in this script
Replies: 6
Views: 1603

Could you give me an idea of the structure of what you mean by skip it. I'm not asking you to code it, but just push me in the right direction. Thanks
by pugs421
Mon Jul 07, 2003 10:26 am
Forum: PHP coding => General
Topic: Create a random filename
Replies: 3
Views: 1022

actually an admin sets up the new members so a user_id is not established until after the info is submitted.
by pugs421
Mon Jul 07, 2003 10:11 am
Forum: PHP coding => General
Topic: allowing null file field in this script
Replies: 6
Views: 1603

Could I get it to skip that section, or would I have to insert the code that inserts the other fields to the database instead of the die? (i'm new at this)
by pugs421
Mon Jul 07, 2003 10:04 am
Forum: PHP coding => General
Topic: Create a random filename
Replies: 3
Views: 1022

Create a random filename

Is there a function to create a unique random filename. Right now when a user uploads a file I just name it to the time. But that cant be good if two users upload something at the same time, right?
by pugs421
Mon Jul 07, 2003 9:11 am
Forum: PHP coding => General
Topic: allowing null file field in this script
Replies: 6
Views: 1603

allowing null file field in this script

I have a script that allows a file upload and resize of an image. By default the script was only one file field, and if a user didn't enter a file error messages are recieved. I have customized the script into a much bigger form and I want the user to be allowed not to upload a picture, while still ...
by pugs421
Sat Jul 05, 2003 6:43 pm
Forum: PHP coding => General
Topic: allowing all possibilities for login name
Replies: 1
Views: 765

allowing all possibilities for login name

*I've searched and I cant find.*

Please point me in the right direction of what to use so the user can enter what ever login/screen name that they want, and it will be displayed the same way when retrieved from database no matter what kind of characters they use.
Thanks.
by pugs421
Sat Jul 05, 2003 7:37 am
Forum: PHP coding => General
Topic: session variable in sql query
Replies: 2
Views: 847

session variable in sql query

I cant figure out the right way to put the session varible into the query. (quotes, parenthesis, etc)



"INSERT INTO setup (photo) VALUES ('$f_org') WHERE screen_name = $_SESSION['screen_name']",
by pugs421
Fri Jul 04, 2003 4:31 pm
Forum: PHP coding => General
Topic: replace a space with an underscore
Replies: 3
Views: 1195

Thanks. That took care of the problem with spaces in the filename. Are there any other special characters that would cause problems when displaying an image?
by pugs421
Fri Jul 04, 2003 7:51 am
Forum: PHP coding => General
Topic: replace a space with an underscore
Replies: 3
Views: 1195

replace a space with an underscore

*newb* trying to customize a script I'm sure there is an easier way to accomplish what I want to do but I'm not working with much php knowledge here. Files are being named by the username but I want to replace any spaces with underscores and strip any special charatcers that may cause a problem when...
by pugs421
Thu Jul 03, 2003 5:40 pm
Forum: PHP coding => General
Topic: take out the spaces and any special characters
Replies: 1
Views: 816

take out the spaces and any special characters

how exactly would i edit this line to take out spaces and special charaters that might cause a problem when contained in the name of a file.

$_SESSION['screen_name'];


(Im new)
by pugs421
Thu Jul 03, 2003 2:31 pm
Forum: PHP coding => General
Topic: Giving uploaded picture a new name
Replies: 3
Views: 955

Repeat
*newbie*


Understood, thanks ;)
by pugs421
Thu Jul 03, 2003 9:57 am
Forum: PHP coding => General
Topic: Giving uploaded picture a new name
Replies: 3
Views: 955

Giving uploaded picture a new name

*newbie* The script I'm trying to customize has a textbox that allows you to type in the title that the uploaded picture will be named. I removed that and tried to set it up where the picture is assigned the name of the user that uploaded it, and image name is stored in the database. I realized the ...
by pugs421
Wed Jul 02, 2003 1:27 pm
Forum: PHP coding => General
Topic: Can a session variable be moved to a different directory?
Replies: 2
Views: 827

Can a session variable be moved to a different directory?

Can a session variable be moved to a page in a different directory than where it was created? I kaap having a problem and thats the only thing I can think of thats causeing it.