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...
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("SELECT max(issue_id) as max_id FROM comic_issues WHERE display_date <= curdate()")...
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...
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...
MySQL, but I solved the problem. Turns out NOW() does indded work, however in my table, "userid" was set to be unique, and since user "test" had already insert items prior to NOW() being implemented, it failed because of a duplicate entry. Thanks for you help though!
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...
I have had NOW() working before when insertinng a timestamp, however, I cannot get it to work now. Here is the SQL script:
$query = "INSERT INTO art SET
userid = '$uid',
type = '$newtype',
filename = '$newfilename',
thumb = '$newthumb',
title = '$newtitle',
media =...
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...
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...
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...
$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'.
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...
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...
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...
I have four variables.
$answer1, $answer2, $answer3 and $rightanswer.
I have a set of radio buttons.
<INPUT TYPE=RADIO NAME="guess" VALUE="1">answer<BR>
<INPUT TYPE=RADIO NAME="guess" VALUE="2">answer<BR>
<INPUT TYPE=RADIO NAME="guess"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.