Insert Record not doing anything
Hello,
I'm trying to follow along with this tutorial about making dynamic websites:
http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt2.html
I've done part 1 completely and was going smoothly until trying to set up the Add Post functionality. The database is working well pulling together information in the Manage Posts page and when I add Insert Record server behavior, it looks fine but hitting "Post It!" button does nothing in live view or in browser preview. It doesn't add the record nor does it redirect to the manage_posts.php link. It just does nothing even when I'm holding cmd click (I'm using a Mac). Other links work fine.
I can add a record manually in phpMyAdmin and have it display correctly in live view of the manage_posts page.
I'm using a mac running snow leapord and using the Creative Cloud Dreamweaver CS6. Using MAMP for a local server and phpMyAdmin, exactly as specified in the first part of the tutorial.
Code is copied below:
<?php require_once('../Connections/check_mag.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO news (title, blog_entry) VALUES (%s, %s)",
GetSQLValueString($_POST['title'], "text"),
GetSQLValueString($_POST['blog_entry'], "text"));
mysql_select_db($database_check_mag, $check_mag);
$Result1 = mysql_query($insertSQL, $check_mag) or die(mysql_error());
$insertGoTo = "manage_posts.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Add Post</title>
<link href="../styles/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>What's the buzz?</h1>
<p><a href="index.php">Admin Menu</a></p>
<form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<p>
<label for="title">Title: </label><input name="title" type="text" class="textfields" id="title" maxlength="150" />
</p>
<p><label for="blog_entry">Post: </label>
<textarea name="blog_entry" cols="45" rows="5" id="blog_entry" form="form1"></textarea>
</p>
<p>
<input name="button" type="button" id="button" form="form1" value="Post it!" />
</p>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p> </p>
</body>
</html>
What do I seem to be missing here? Any help would be greatly appreciated.
Your "Post It!" is a button, not a submit button. Change it to a type="submit" and see if that works.
^_^
Similar Messages
-
I tried to burn a DVD using iDVD after upgrading to Maverick, first time I tried after upgrading to Maverick a few weeks ago. It seems to get stuck at encoding menu stage and not doing anything. Does anyone else have the same problem?
I did not have a DVD handy to burn but I have just created a small 2 minute video and created a Disk Image and also a VIDEO_TS folder, the encoding worked correctly, so it works with some items.
You may get a better responce in the iDVD forum.
https://discussions.apple.com/community/ilife/idvd
regards -
After I tried to update my Ipad mini to the newest update, it kept saying hello on my lock screen in different languages and then when I slide the screen across, it says connected to itunes but it's not doing anything!! By the way my Ipad mini is plugged into my computer and connected to itunes!! Please help me!!
FORCE IPAD INTO RECOVERY MODE
1. Turn off iPad
2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
3. Plug USB cable into computer's USB port
4. Hold Home button down and plug the other end of cable into docking port.
DO NOT RELEASE BUTTON until you see picture of iTunes and plug
5. Release Home button.
ON COMPUTER
6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
7. Select "Restore iPad"...
Note:
1. Data will be lost if you do not have backup
2. You must follow step 1 to step 4 VERY CLOSELY. -
Redirect rule not doing anything
Note that the email account the the follwing applies to is a gmail account
I have a rule in Mail that sends all emails from Macworld, Mac-Forums, and MacWeek to a folder (OK, a label in gmail parlance) and flags it "green" (so I can find them easliy and read them later). Problem is the rule is not doing anything. Ideas?Doesn't work for three days, but as soon as I post a message it starts working. #sigh
Actually, restarting the Mail program seemed to fix it. -
i came home and my iphone is now frozzen on the apple screen and it hasnt been doing anything i put it in the charger and its not doing anything how do i get it to work so i can text and call and stuff
I got to that page but clicking on the Subscribe Free had no effect.
Nothing showed in the Podcasts nor the iTunes U.
In fact I also subscribed to Stanford's lectures and despite actually managing to DL them there is still no subscription in iTunes U, just the Intro to Computer Science belatedly.
Peter
I'd like to attach the screen grab of the out of order and randomly DLed selection of Harvard's course, but the forum won't let me attach it even though it is only 456k. Correction, close post and retry and now it lets me. NB how intermittent the DLs are and in no particular order. -
Trying to delete pages 21-24 on iPhoto book but "remove pages" option grayed out and pressing delete button not doing anything. These extra pages resulted from using Autoflow and now we can't seem to get rid of them. Help!
Good morning Old Toad.
I did as you suggested:
1) Booted from install CD.
2) Ran Disk Utilities on internal hard drive--no repairs necessary. For good measure, did the same thing on external drive. Also no repairs necessary.
3) Checked software update--no updates found. About this Mac said I was already running 10.4.7. For good measure, I downloaded the latest and installed it. Since it let me run the install, I'm not sure if I installed something new or reinstalled what I already had.
4) I rebooted from CD, ran disk utilities, ran repair disk--no repairs necessary. Repaired permissions and a lot of permissions repaired.
5) Tried to delete the files and the same old thing happened: kernel panic. The specific message:
panic(cpu 0 caller 0x00102A08): jnl: transaction too big (1587712 >= 1572352 bytes, bufsize 8192, tr 0x29f1fb0 bp 0x2801de40)
So there's no change in my status.
I'm trying to delete the files because:
A) They already take .5 Gb.
B) I can't get rid of them ever. If I move the problem files to a different folder, I can only do one successful drag-and-drop backup to the external drive until the "new" thumb segments become unerasable just like the previous versions and crash the system.
C) I can't even "just" drag and drop every file/folder except the thumbs, because that ends up crashing the system as well. So I have to drag and drop every file/folder in the iPhoto hierarchy individually. Which makes me less inclined to backup, which defeats the purpose of a backup.
D) After the iPhoto fiasco I'm just crabby about all the Apple screw-ups I'm experiencing and I want to get them fixed.
Thanks for your help. Any additional suggestions would be appreciated.
G4 Mac OS X (10.4.6) -
I'm having problems with Siri on my iPhone 6. It worked briefly yesterday and now its not doing anything. I have turned phone off and on and made sure everything is on in settings. Please help!
Do you have an active data connection (wifi or cellular)? Have you tried resetting the phone by pressing and holding the Home and power buttons until the apple appears (this is different than just turning it off and back on).
-
I lost my contacts on my 3gs and was not doing anything with the phone.. it was plugged into the wall charging... can anyone help??
cannect it to a computer and let it sync through iTunes. Contacts are a broad problem. You need to state where your contacts are located i.e. do you use yahoo mail? do you sync to iCloud? there are alot of answers for you problem but you need to be a little more detailed
-
I updated my iphone to the new version and now it tells me to connect to itunes which I did and it's not doing anything else, what do I need to do?
Try to connect in recovery mode, explained in this article:
iOS: Unable to update or restore -
My network symbol keeps working on my home page even when I'm not doing anything, I know there has been problems in the past with this so has it come back, help it's killing my battery!
Close all open apps by double-tapping the home button, then swiping up and off the screen with the app window (not the smaller icon).
Reset your device: hold down the home button along with the sleep/wake button until the screen goes black and you see the Apple, then let go. (No data loss) -
I am trying to use the "This solved my question - 10 points" an the "This helped me - 5 points" but they are NOT doing anything. How do I award the points ?
Are you talking about the "Legend" panel at the right of the window?
Those text are just help texts explaining the reputation points. You can only award points, if you are the original poster of a question. Then you will see active buttons to award points below the answers you receive. See here for more information: https://discussions.apple.com/static/apple/tutorial/reputation.html
Regards
Léonie -
! just got a new docking system so i plugged it in to my computer because it wasnt the wall charge type, so I put in my ipod, then straight away my screen went white and now its not doing anything! i press the home and lock button nothing happens... then i plug it in my computer it doesnt come up in itunes or even the copmuter. please help i can not live with out my ipod!
Your post is abit confusing, especially on getting those weird messages and emails,( assumed in your Windows machine.)
Most likely you have Restored the iPod using the new Macbook pro, using the same name as that in your Windows machine, hence the duplicate name warning, as it is trying to sync Automatically.
If you are syncing your iPod to both the Mac and Windows, you must set it to Manually Manage Music, in the first machine that you setup iTunes with the iPod. Read thsi Apple Support Article
In iTunes, Preference, tick on Prevent devices syncing automatically
Hopefully your music are still in both your iTunes library,
Connect the iPod to the Mac
Restore it (just to fix any filesystem corruption by the Windows end)
Set it to Manually Manage Music
Sync your selected songs in your library.
Whern sync complete, Eject it
Connect it to your Windows PC.
Select the song in the library
Sync it.
It should work if your ipod Hardisk is not giving any problem.
Good luck! -
Force click not doing anything with long press
My force click preference to show definitions and other information is not working. I'm doing like the video shows, but apparently it isn't working. It works when i use the alternative 3 finger tap.
Hi TIA;
We are facing some performance issues in our database since past few days. The some of concurrent requests which use to finish in 10 mins are running for more than 2 hrs. There are no locks in database, and the request is not doing anything in database (Not generating any Undo). When we check at the db server, the database process associated with the request is not shown in top process report, so we realise that it is not doing anything on the server level as well.
What may be cause of the issue. How to identify why request is not doing anything. Does the server process gets disconnected from session. We have two node rac database.What is your OS and EBS? It was working before if answer yes what have u been changed on ur syste?(patch etc)
You have any error message on alert.log and also concurrent log?
Please check below thread which could helps you
Concurrent Manager very slow
Concurrent Manager very slow........
Oracle apps database
Regard
Helios -
Insert Record not saving values
Hi,
I am extremely new to Dreamweaver. I am using MX2004.
I am trying to work with a remote database that I created in
MySQL and I am using PHP.
I created a PHP page added my form, added my input fields,
and used the Insert Record wizard to get to my database on the
server. I also went to the columns section and where it says
‘Fieldname’ Does Not Get a Value. I went and chose my
value from the drop-down Value box. It now says
‘Fieldname’ Gets Value From
‘FORM.Fieldname’ as ‘Text’ I have done that
for all the columns that I am asking the users to fill in including
the fields that are NOT NULL.
The problem is once I test it, it is not putting the data in
the database. When I go back and look at my columns in the Insert
Record Server Behaviors, many of my columns have reverted to
‘Fieldname’ Does Not Get a Value.
For some reason my values are not being saved.
Can someone help with this?
Thanks,
SocapriceThanks Mike. I've sloghtly modified my question and reposted
here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1322354&enterthread=y
Do you have any thoughts on this?
Cheers,
Roger. -
IiPad is stuck in the iTunes connect screen. I have held the home button down while plugging the iPad in and still nothing. Hard reset isn't even doing anything. It's not even showing up under my computer. Please Help
Did you get a message that the iPad is disabled?
iOS: Device disabled after entering wrong passcode
http://support.apple.com/kb/ht1212
Using iPhone/iPad Recovery Mode
http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
Saw this solution on another post about an iPad in a school enviroment. Might work on your iPad so you won't lose everything.
~~~~~~~~~~~~~
‘iPad is disabled’ fix without resetting using iTunes
Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
2. Open iTunes with the iPad disconnected.
3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
5. Click ‘Setup as new iPad’ and then click restore.
6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
~~~~~~~~~~~~~
Try it and good luck. You have nothing more to lose if it doesn't work for you.
Cheers, Tom
Maybe you are looking for
-
Why does Verizon "close" repair tickets when the work has not been completed? Friday my underground FiOS cable was cut somewhere between the junction box and my garage. I called Verizon; a tech arrived at 5pm. He said he couldn't determine where t
-
Hi, i have a doubt, can i have my pdf files on my sd, edit them while in class with no internet connection and when back online they will sync, all i want is to able to open my files without wifi and edit them but when back online sync their changes
-
How do I get Comcast to work with Safari?
My Comcast home page has stopped opening in Safari. I get a "Request Timed Out" message. Is there a solution?
-
We are in the process of replacing our shared network drives with UCM in my organization, and during our information audits we have discovered that many folks throughout the organization make rampant use of shared Excel files. We are now being asked
-
Pass Flash Variables To Javascript, How????
How can I pass variables to be used on the page the flash is embed?