INSERT Code Isnt Working.
This probably has a really simple answer, but my INSERT code isnt working.
mysql_query('INSERT INTO `members`
(`id`, `uname`, `uemail`, `upass`, `GUID`, `data`, `permissions`)
VALUES ('NULL', $psuser, $psemail, $psPassword, 'NULL', 'NULL', Ƈ')');
And I get an error saying
unexpected T_STRING .
View Complete Forum Thread with Replies
Related Forum Messages:
How Do Sessions Work Cos Mine Isnt Working?
How do sessions work cos mine isnt working i got this: on a different page i have : $_SESSION['referer'] = '1'; then: if ($_SESSION['referer'] == '1'){ include ("include.php"); } but when i echo session it is blank =/ what did i do wrong.. i got many other sessions on the go so it should work..
View Replies !
Simple Image Upload Isnt Working?
im working on a simple image upload script (my first try) well i noticed that for some reason its not even recognizing a file being uploaded...ive tried using the phpfreaks simple image upload tutorial but that wont seem to work for me. Code:
View Replies !
INSERT Short Record = Fine, Long One Isnt
I have a mysql database table that I created by copying another one in phpadmin. The first table works fine. the second table works fine when I insert a short record, but when I do a long one it doesn't appear in the database. any idea what I'm doing wrong? It's not that its truncating the record, there is nothing there.
View Replies !
Security Code Image In PHPNuke Login Isnt Displaying
i installed the PHP Nuke in a remote web space bought from prackhost.Problem is that iam not able to get the security code to login to the site as admin or normal user. All the remaining images like links and logo are comming except that security code. Iam not able to do any furthur action.
View Replies !
Insert Not Working
I am quite new to php but can understand most things..however this script has really stomped me. I am simply trying to insert this data into the database and all the names and everthing is correct. It has worked fine for me before but i am completly unsure why it is not working now. Heres The script:
View Replies !
Insert Query Is Not Working At All
So this is my first php application I have ever made and I'm goign full out on it. I have a little bit of c++ and java skill so I'm not that stupid when it comes to programming. The problem that I am having is my insert query is not working at all and I have no clue why. Code:
View Replies !
Insert Function Not Working
I know i missed up somewhere in this, but I can't locate where. Anyone see what i did wrong? When i run this the database is not affected, all the settings are correct for user, host, login, table, etc. I hav e a duplicate insert script I use to insert some other information in this database table, but i changed which rows are being inserted to and it stopped functioning. I verified the rows listed in the insert statement are spelled exactly as they are here. I keep going over it and do not see anything wrong with the variables, they are passed using a post form to this script and i switched it to get jsut so i could manua;;y see that the right data is being sent to the script, it is. I have to have a typo or something in here and just can't figure it out.. Code:
View Replies !
Insert Data Not Working
i have a problem with inserting data to database. i have to insert array as well,which is not working.the first query work, but the second query didnt work.the second query should insert array of data. Code:
View Replies !
Insert NULL Not Working On Localhost
This works fine on my hosting site and on another PC with apache and WinXP. But on my lap top where I also installed Apache on XP I get this error: Error code 1366: Incorrect integer value: 'null' for column 'sequence_number' at row 1 $SendQuery = "INSERT INTO Photo_sequence VALUES('null')"; This is the table I created: Code:
View Replies !
Header Not Working - If No Errors Does And Insert
In a script that looks for posted variables and then errors and if no errors does and insert. I have a problem with setting the page to forward. If I use the header command: header("Location: $u"); It does not work. However if I use meta refresh it does work: print "<META HTTP-EQUIV="refresh"content="2;URL=http://localhost$u">"; The header command works properly on many pages. I even tried an exit; after the header commant, but that does not work either.
View Replies !
INSERT Statement Not Working - Array Question
it has been awhile since I coded in PHP and I have a little problem that is eating up way too of my energy. I have a form that is being submitted via the POST method In the handler.php file, I want to take that information and insert it into the Database. Code:
View Replies !
Why Mysql Isnt Connecting
trying to get php to connect with mysql so that I can start querying db(running locally on my machine and php works fine) however I'm having trouble. This is the error it spits out- Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using password: NO) in D:phpwebconnect.php on line 5 Unable to connect to MySQL Could anyone assist me on this matter.
View Replies !
PHP INSERT Code (MySql)
Ok... i want to insert info into a db using php and mysql... I can connect to the db using most of this code the only thing i am having trouble with is the 'mysql_result'.... If anyone could help. that would be great... thanks. This is the code im using... my sql statement is fine but im not sure what php code to use... <?php $db = mysql_connect(sql,username,password); $sql = "INSERT INTO tblMyTable (name,address) VALUES ($strName,$strAddress)"; $res = mysql_db_query(username, $sql) ***here is my problem... what goes here? mysql_result($res,0); ***that was my guess but its not working.. ?> I couldnt find the code in the manual.. If anyone could help that would be great thanks
View Replies !
Code To Insert The $name Into The Database.
I have this code to insert the $name into the database. However it won't work. PHP Code: for($i=0; $i<$numDadosNoArray; $i++) { $firstnames = array("Peter", "John", "Francisco"); $lastnames = array("Simão", "Gustavo","Gaspar"); $nome= $firstnames[array_rand($firstnames)]." ".$lastnames[array_rand($lastnames)]; $queryNome = mysql_query("SELECT * FROM equipa WHERE jogadores='$nome'"); $numRegistos = mysql_num_rows($queryNome); if($numRegistos==0) { mysql_query("INSERT INTO equipa (jogadores) VALUES ('$nome')"); How can I make it work?
View Replies !
Insert Code Into File?
ok im writing a cms system and i have a page that lets you edit the config file problem is it not getting the variable $scmspms from the form?: Code:
View Replies !
Isnt ^ Common Regex Notation?
isnt ^ common regex notation? keep getting this error: Parse error: syntax error, unexpected '^' Code: $goalsheet.=preg_replace("/^[0-9]+ Year Career Goal #[0-9]+: *$", "/^<span class=hd2>[0-9]+ Year Career Goal #[0-9]+: *</span><br>$/", $goallist); aside from the error, i think the regex is off, but i hav had a hard time finding a tutorial that explains how I can ignore text in the middle. Here are some examples of what i'm trying to do: "1 Year Goal #1: Web Developer" -> "<span>1 Year Goal #1: Web Developer</span><br>" "10 Year Goal #2: IT Consultant" -> "<span>10 Year Goal #2: IT Consultant</span><br>" suggestions?
View Replies !
UPDATE Code Not Working.
Can anyone tell me why this may not be working? mysql_query("UPDATE GC SET GCNumber=".$GC.", KEYCODE=".$KEY2." WHERE KEYCODE=".$_GET['KEY']); On running a print of those variables, everything looks fine. But this line isn't updating my table!
View Replies !
Code Working In Firefox But Not IE 7
I have some code that seems to be processed by Firefox (v 2.0.0.3) but not IE7 (v 7.0.530.11). This is the first time i have ever encountered something like this before and was just wondering if you guys could shed any light. Code:
View Replies !
Script Isnt Pulling The Basename From Upload
This upload script im using for some reason wont pull the file name and database it when you go to upload a file and it wont upload the file either... I used this script before and got it to work but for some reason it wont work now.. I checked the other forms and they still work so i must be missing something in the script. Code:
View Replies !
Install PHP W/DreamweaverMX Or Just Insert PHP Code Into HTML?
I am brand new at PHP and Dreamweaver MX. We have Linux/appache. I need to create a form on the web/and communicate data to/from an MS Access DataBase. I saw a great tutorial ref in devshed. If I have Dreamweaver MX, do I need to purchase PHP? Dreamweaver can process PHP code embedded into its HTML, I think but do I need "something" else? What version of PHP is MX using ? Are there other links that provide "PHP script/code" to use to connect to Access?
View Replies !
Code Insert To View Session Variables ?
I am having some challenges using session variables between pages with Dreamveaver MX. Is there a piece of code i can temporarily place into my pages that will print the values of all Session Variables, such that I can see they are definately being passed between the pages?
View Replies !
Mysql_fetch_array Working In Phpmyadmin But Not In Code
I set up phpmyadmin, and it works fine, but my code isn't working. id is the correct column (it is the primary key), stock is the correct database. CODE: $qresult = mysql_query("SELECT id FROM 'stock'"); echo ("START<P><HR>"); while ($row = mysql_fetch_array($qresult)) { echo ($row ["name"]); echo ("<br>"); } echo ("<P><HR><P>END"); OUTPUT: START Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/houseproudlancs_co_uk/index_to_be.php on line 14
View Replies !
If Statement Is Not Working The Code Inside
My if statement is not working the code inside is being ran everytime even when it dont meet the conditions, when i test my code with echo on the update statement its not liking lines brings up an undefined index notice for these lines Code:
View Replies !
Error Checking Code Not Working
why my error checking code isnt working properly it is a long script, but the reason is when i havent got it in my script updates correctly, but when ive got error checking in to make sure all fields have been entered it just doesnt send / update the daa within the database code is below: Code:
View Replies !
Code Not Working After Server Reload
A friend of my rents a server and hosts my site. This past week he reinstalled the OS on the server and went from Red Hat to CentOS. Anyways, after the reinstall I started restoring some files and I have noticed that the PHP code for the website navigation/menu does not work anymore. The code has not changed and it has been working fine for over 3 years.. Code:
View Replies !
Login Session Code Not Working
im trying to get the sessions working for my login page the code doesnt give me any error messages but it doesnt seem to restrict any access either this is wot i have so far: Code:
View Replies !
Php Code Embedded Inside Html Page Not Working.
How do I make or workaround in my Apache server to parse *.html files for <?php ?> code embedded in it? Currently php recognises <?php ?> tag only if the file has a *.php extension. Any php code inside *.html or *.htm is ignored. Since I dont have admin access to the server or admin person, changing the php configuration is out of choice. Now I have to go thru echo and print statemnets to get it work. But it looks very cumbersome and prone to errors.
View Replies !
Present An Array Of Data, And The Corresponding Primary Key And Let The Code Work Out Whether To INSERT Or UPDATE It.
There's lots of DB abstraction layers out there, but a quick look around them hasn't turned up anything which seems to met my requirements. Before I go off and write one I thought I'd ask here if anyone knows of such a beast... I want some code where I present an array of data, and the corresponding primary key and let the code work out whether to INSERT or UPDATE it, I also want to be able to present the data from a QBF or QBE then be able to step through the result set. However I don't want to have to configure the DBMS structure - after all most of it is already in the DBMS (OK so not the relationships in a MySQL db). It'd be really cool if I could throw SQL directly at it *too*.
View Replies !
Insert Values - Table Has Four Columns To Insert Into
I have a bunch of information that I want to insert into a table insert into TABLE values ('hello','I','am','lost'); pretend that the words that are being inserted are coming from a form for another page. In he case I above I have declared that the table has four columns to insert into. What if I do not know how many columns there are?
View Replies !
Insert Into Table - $query = "INSERT INTO Tbl
I have a small problem which I've been working on for a while. PHP Code: $query = "INSERT INTO tbl(username,ip,link) VALUES("Brin' . $result['id'] . '","$REMOTE_ADDR","http://www.domain.com/sub/start.php?username=Brin"' . $result['id'] . ' )"; mysql_query($query); Any ideas?
View Replies !
Insert Statement Doesn't Insert Anything
I have an int field in a database and for teh purposes of this case the insert statement doesn't insert anything into the field using the ' ' syntax however in the mysql database this appears as 0. I was wondering can I still use the empty syntax as follows or will it not work as it is 0 does is this not classed as empty? if (empty($row['intTest'])){ $sns= "empty"; }
View Replies !
Working Connection... Not Working? (Advanced)
It has tons of modules, and obviously a config file which opens the db connection. But there is one, and only one, module having strange troubles. $query is just a simple INSERT INTO command. But it does not inserts anything. I only obtain... nothing. Neither an error from the server! Code:
View Replies !
Sessions Working, Then Not Working?
I wrote a login script (one that I have used on quite a few sites previously) and have found that it was working, then not working, then working again now not working - all without me changing any code. Here is the process: 1) l/p gets sent to login.php to query the db 2) if login successful, set $sid = session_id, and other session variables, register them in the session, and redirect to main.php 3) first thing on main.php is check_login function, all this does is see if $sid is set and equal to the current session_id(). If succeed continue to display data on main.php based on registered user data. If fail, redirect to error.php with the appropriate error code. this all takes place on a shared ssl server if that matters. The trouble I'm having is the check_login function is failing because no session variables are present, including $sid. I'm 99.9 percent certain it's not a code issue because 1) I have done this same script many times before with no trouble, and 2) this particular one was working before So I am really looking for php configuration issues to check on, or things like that.
View Replies !
Old Code Vs New Code - Language Syntax Change?
I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following; I used to use a function as such; if ($REQUEST_METHOD=="POST") { Now I've seen alot of the syntax is if ($_SERVER($REQUEST_METHOD=="POST")) { And referencing variables from the form is as such; $_POST['variable'] Where previously I could reference them in the simple form; $variable Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?
View Replies !
Regular Expression :: Format Anything Within <code> And </code>
Any regular expression wizards out their tonight? This is driving me crazy...trying to take a string full of HTML and format anything within the <code></code> tags using highlight_string(). $string = "<strong>This</strong> is some HTML!!!<code>echo "Hello, World!";</code>No more code!!!"; $pattern = "(<code>)*(</code>)"; $replacement = " |