Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: kpdvx
  • Order by date
  1. kpdvx

    quick variable help needed

    I have a function I wrote called writeConfig. Anyhow, I pass these variables to it- writeConfig($_POST['dbvalue]['0'], $_POST['dbvalue']['1'], $_POST['dbvalue']['2'], $_POST['dbvalue']['3']); and I get an error: Parse error: parse error, unexpected T_LNUMBER, expecting ']' Any idea how I can...
  2. kpdvx

    A way to comibine two SQL calls.

    Here are two seperate MySQL calls, can I possibly consolidate these into one? // perform SQL query. Get the max for the issue_id, this so we know what numbers we can work with. $query1=MYSQL_QUERY(&quot;SELECT max(issue_id) as max_id FROM comic_issues WHERE display_date <= curdate()&quot;)...
  3. kpdvx

    CMS questions

    If I were to right my own... which I am considering... Any ideas as to how I would allow authors to add images to their articles? I know I could allocate template space for one image, and have the author upload the image... however this is not very flexible.... Would a Java WYSIWYG editor...
  4. kpdvx

    CMS questions

    I am wanting to put my school newspaper online, and I was looking for a good CMS that I can use (or modify) to display our content. I know PHP/MySQL fairly well, however I would like to deploy this within as short a time as possible, and I dont want to code something that has already been coded...
  5. kpdvx

    NOW()

    MySQL, but I solved the problem. Turns out NOW() does indded work, however in my table, &quot;userid&quot; was set to be unique, and since user &quot;test&quot; had already insert items prior to NOW() being implemented, it failed because of a duplicate entry. Thanks for you help though!
  6. kpdvx

    NOW()

    I echoed the query, and it outputs as timestamp = NOW() or timestamp = 'NOW()', or timestamp = #NOW(), or timestamp = '#NOW()' depending on what I set it to be in the query. I had this working before when I had the query like this: INSERT INTO art (timestamp) VALUES (now());, or something like...
  7. kpdvx

    NOW()

    I have had NOW() working before when insertinng a timestamp, however, I cannot get it to work now. Here is the SQL script: $query = &quot;INSERT INTO art SET userid = '$uid', type = '$newtype', filename = '$newfilename', thumb = '$newthumb', title = '$newtitle', media =...
  8. kpdvx

    Best way to use radio buttons...

    ahem, it is a PHP question. Here is a bad way to do it: SELECT * FROM table WHERE blah=blah. if ($one == 'checked') { $checkedone = 'checked'; } if ($two == 'checked') { $checkedtwo = 'checked'; } if ($three == 'checked') { $checkedthree = 'checked'; } <input type=radio name=foo value=1...
  9. kpdvx

    Best way to use radio buttons...

    What is the best way to use radio buttons? I know how to insert their value, but, I also want to make an edit form, where the current value of the radio button is selected, but you could also change it. Say if in the database, radio4 was selected; when you edited that form, the radio button with...
  10. kpdvx

    ensuring unique names

    Is there any way to create a directory by script? As in when a user creates an account, a directory is automatically created? If I could do this, I would use fwrite to make an index.php file...
  11. kpdvx

    function help

    NOT NULL, so blank.
  12. kpdvx

    function help

    $photo is a field in the profiles table. It is assigned to $photo when I extract it. Yes, it is blank. If the field is blank, then I want $photo_filename = 'default.gif', and if it has a value, then I want $photo_filename to be equal to that value, like say, 'picture.jpg'.
  13. kpdvx

    function help

    function userphoto($uid) { $query = &quot;SELECT photo FROM profiles WHERE userid = '$uid'&quot;; $result = mysql_query($query); @extract(mysql_fetch_array($result)); if ($photo != &quot;&quot;) { $photo_filename = $photo; } elseif ($photo == &quot;&quot;) { $photo_filename =...
  14. kpdvx

    ensuring unique names

    What about this? $rstring = substr(md5(time()),0,8); $filename = $userid.$rstring.'_'.$filename; ? Would this always be unique? I would think it would be because time is always unique...
  15. kpdvx

    ensuring unique names

    I am building an online art gallery for a friend. It will have maybe 15 users uploading their art. I had planned on every artists art being uploaded to artwork/ but somehow i need to keep the filenames unique. I was thinking of $filename = $userid.$random_number.$filename, but would this ensure...
  16. kpdvx

    String Question, Should be REALLY easy

    addslashes($variable) perhaps?
  17. kpdvx

    directory question

    This may be more of an HTML question, but here goes. I've been building PHP websites for a while, and I've always built my user interface in a file called ui.php, and I include ui.php from my pages. This works fine, unless I include it from a directory within my root directory, like for...
  18. kpdvx

    random variable

    I have four variables. $answer1, $answer2, $answer3 and $rightanswer. I have a set of radio buttons. <INPUT TYPE=RADIO NAME=&quot;guess&quot; VALUE=&quot;1&quot;>answer<BR> <INPUT TYPE=RADIO NAME=&quot;guess&quot; VALUE=&quot;2&quot;>answer<BR> <INPUT TYPE=RADIO NAME=&quot;guess&quot...
  19. kpdvx

    Simple array question.

    $query = &quot;SELECT definition as answer FROM verbum limit 4&quot;; $result = mysql_query($query); How do I echo the 4 listings? Thanks!
  20. kpdvx

    CSS container height=100%

    in other words, I want the absolutely posisioned CSS box to stretch in height to encompas any text overspill... Can I do this?

Part and Inventory Search

Back
Top